gives an integer hash code for the expression expr.
gives an integer hash code of the specified type for expr.
gives a hash code in the specified format.
- Hash[expr,…] will always give the same result for the same expression expr.
- Possible hash code types include:
"Adler32" Adler 32-bit cyclic redundancy check "CRC32" 32-bit cyclic redundancy check "MD2" 128-bit MD2 code "MD4" 128-bit MD4 code "MD5" 128-bit MD5 code "RIPEMD160" 160-bit RIPEMD code "RIPEMD160SHA256" RIPEMD-160 following SHA-256 (as used in Bitcoin) "SHA" 160-bit SHA-1 code "SHA256" 256-bit SHA code "SHA256SHA256" double SHA-256 code (as used in Bitcoin) "SHA384" 384-bit SHA code "SHA512" 512-bit SHA code "Expression" expression hash code (default)
- The "Expression" hash code is computed from the internal representation of an expression and may vary between computer systems and from one version of the Wolfram Language to another.
- For hash code types (such as "SHA") that operate on sequences of bytes, Hash[expr,…] first converts expr to bytes according to:
expr bytes in ToString[FullForm[expr]] "string" bytes in the UTF-8 representation of string ByteArray[…] literal bytes in the byte array
- Possible formats include:
"Integer" integer (default) "DecimalString" decimal string "HexString" hexadecimal string "Base36String" base-36 alphanumeric string "Base64Encoding" Base64 encoding "ByteArray" hash code as an explicit byte array
Examplesopen allclose all
Introduced in 1988
(1.0)| Updated in 2018