Home

hash

A hash is a function that maps data of arbitrary length to a fixed-size string of characters, commonly called a hash value or digest. In computing, hash functions are used to enable fast data lookup with hash tables, to detect changes, and, in many cases, to support security.

A hash function should be deterministic, producing the same output for the same input, and it should

Cryptographic hash functions are designed to satisfy stronger properties such as preimage resistance, second-preimage resistance, and

Uses range from data integrity checksums and password hashing (often with salts and key-stretching algorithms like

In practice, cryptographic hashes are designed to be deterministic, collision-resistant, and resistant to efficient preimage attacks,

have
a
fixed
output
length.
Non-cryptographic
hashes
emphasize
speed
and
distribution;
cryptographic
hashes
add
resistance
to
preimage
and
collision
attacks.
Common
properties
include
being
fast
to
compute,
having
uniform
output
distribution,
and
resisting
easy
inversion.
collision
resistance.
These
properties
underpin
uses
in
digital
signatures,
message
authentication,
and
data
integrity
guarantees.
Examples
of
hash
algorithms
include
MD5,
SHA-1,
SHA-256,
SHA-3,
and
BLAKE3;
MD5
and
SHA-1
are
now
considered
insecure
for
collision
resistance
and
are
generally
avoided
in
security
contexts.
bcrypt,
scrypt,
or
Argon2)
to
digital
signatures,
blockchain,
and
various
authentication
mechanisms.
In
data
structures,
a
hash
function
maps
keys
to
bucket
indices
in
a
hash
table,
with
collisions
resolved
by
chaining
or
open
addressing.
while
non-cryptographic
hashes
prioritize
speed
and
practical
distribution
for
general-purpose
data
handling.