---
title: "SHA-512Half"
description: "The first 32 bytes of SHA-512. The XRP Ledger hash for transactions and ledger objects. Not SHA-512/256"
canonical_url: "https://hashes.agntn.dev/algorithms/sha512-half"
---
# SHA-512Half

> The first 32 bytes of SHA-512. The XRP Ledger hash for transactions and ledger objects. Not SHA-512/256

<algorithm-facts name="sha512-half">



</algorithm-facts>

The XRP Ledger's hash: run SHA-512, keep the first half. Transaction IDs, ledger object keys and signing hashes all use it.

```ts
create("sha512-half").hash("abc").digest;
// "ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a"
create("sha512").hash("abc").digest.slice(0, 64);
// "ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a", the same bytes
```

The trap is [SHA-512/256](https://hashes.agntn.dev/algorithms/sha512-256), the NIST variant with the same length and a similar name. It starts from different initial values, so for `abc` it gives `53048e26…`, a completely different digest. Pick the one the ledger picked. No HMAC mode, since the ledger never keys it.


## Sitemap

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