mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-27 07:05:51 +00:00
Hashes - clarify hash prefixes, SHA-512Half size.
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
# Ledger Object IDs
|
||||
<a id="sha512half"></a>
|
||||
|
||||
All objects in a ledger's state tree have a unique ID. This field is returned as the `index` field in JSON, at the same level as the object's contents. The ID is derived by hashing important contents of the object, along with a [namespace identifier](https://github.com/ripple/rippled/blob/master/src/ripple/protocol/LedgerFormats.h#L99). The [ledger object type](ledger-object-types.html) determines which namespace identifier to use and which contents to include in the hash. This ensures every ID is unique. To calculate the hash, `rippled` uses SHA-512 and then truncates the result to the first 256 bytes. This algorithm, informally called **SHA-512Half**, provides an output that has comparable security to SHA-256, but runs faster on 64-bit processors.
|
||||
All objects in a ledger's state tree have a unique ID. This field is returned as the `index` field in JSON, at the same level as the object's contents. The ID is derived by hashing important contents of the object, along with a [namespace identifier](https://github.com/ripple/rippled/blob/master/src/ripple/protocol/LedgerFormats.h#L99). The [ledger object type](ledger-object-types.html) determines which namespace identifier to use and which contents to include in the hash. This ensures every ID is unique. To calculate the hash, `rippled` uses SHA-512 and then truncates the result to the first 256 bits. This algorithm, informally called **SHA-512Half**, provides an output that has comparable security to SHA-256, but runs faster on 64-bit processors.
|
||||
|
||||

|
||||
|
||||
|
||||
## See Also
|
||||
|
||||
For ledger basics, see [Ledgers](ledgers.html).
|
||||
- For more information how the XRP Ledger creates and uses hashes, see [Hashes](basic-data-types.html#hashes).
|
||||
- For ledger basics, see [Ledgers](ledgers.html).
|
||||
|
||||
|
||||
<!--{# common link defs #}-->
|
||||
|
||||
Reference in New Issue
Block a user