docs.rodeo

MDN Web Docs mirror

Cryptographic hash function

{{GlossarySidebar}} 

A cryptographic hash function, also sometimes called a digest function, is a {{glossary("cryptography", "cryptographic")}}  primitive transforming a message of arbitrary size into a message of fixed size, called a {{glossary("digest")}} . Cryptographic hash functions are used for authentication, {{Glossary("digital signature", "digital signatures")}} , and {{Glossary("HMAC", "message authentication codes")}} .

To be used for cryptography, a hash function must have these qualities:

Cryptographic hash functions such as MD5 and SHA-1 are considered broken, as attacks have been found that significantly reduce their collision resistance.

See also

In this article

View on MDN