Show in graph
SEC

Software → Security

Hash Function

A function that maps input data of arbitrary size to a fixed-size value.

Motivation

Hash function solves the problem of mapping input data to a fixed-size value.

Where it fits

Hash Function appears in data structures, databases, security, and distributed systems.

Mental model

A hash is a deterministic fingerprint-like value, but different hash functions have different guarantees.

Common mistakes

  • Using ordinary hash functions for password storage.
  • Assuming hashes are always unique.

Hash Function connects to hash table, cryptographic hash, password hashing, and consistent hashing.