I'm trying to understand how hash functions work, particularly in security contexts like password hashing and data integrity checks. Can you explain the process of how hash functions create fixed-length outputs from variable inputs, and what properties make them secure?
A simplified explanation of the underlying mechanics would help.