Algorithms
SHA-512
The widest SHA-2 with 64 bytes of digest and HMAC. Often faster than SHA-256 on 64-bit machines
Hash / Cryptographic
SHA-512
The widest SHA-2, 64-bit words all the way.
- Digest
- 512-bit · 64 bytes
- HMAC
- takes a key
- Security
- 256-bit collision resistance
- Family
- 16 in cryptographic
2 options, 0 required
Sample
- hex
- 309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f989dd35bc5ff499670da34255b45b0cfd830e81f605dcf7dc5542e93ae9cd76f
- base64
- MJ7MSJwS1utMxA9QyQLytNDtd+5RGnx6m808qG1M2G+YndNbxf9JlnDaNCVbRbDP2DDoH2Bdz33FVC6TrpzXbw==
Options
Access
- Create
create("sha512") - CLI
hashes sha512 'hello world' - Tryplayground with the sample above
- Kinsha256, sha384, sha512-half, sha3-256 +11
64-bit words all the way down, which makes it the fast one on a 64-bit CPU when the hardware has no SHA-256 instructions. Ed25519 signs with it, and PBKDF2 here defaults to it under HMAC.
create("sha512").hash("abc").digest;
// "ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f"
Need 32 bytes of it? That's either SHA-512Half or SHA-512/256, and they are not the same thing.