---
title: "SHA-512"
description: "The widest SHA-2 with 64 bytes of digest and HMAC. Often faster than SHA-256 on 64-bit machines"
canonical_url: "https://hashes.agntn.dev/algorithms/sha512"
---
# SHA-512

> The widest SHA-2 with 64 bytes of digest and HMAC. Often faster than SHA-256 on 64-bit machines

<algorithm-facts name="sha512">



</algorithm-facts>

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](https://hashes.agntn.dev/algorithms/pbkdf2) here defaults to it under HMAC.

```ts
create("sha512").hash("abc").digest;
// "ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f"
```

Need 32 bytes of it? That's either [SHA-512Half](https://hashes.agntn.dev/algorithms/sha512-half) or [SHA-512/256](https://hashes.agntn.dev/algorithms/sha512-256), and they are not the same thing.


## Sitemap

See the full [sitemap](https://hashes.agntn.dev/sitemap.md) for all pages.
