Expand description
A generic (cross hash) digest, which is always 256 bits and composed of 8 words
Macros§
- digest
- Macro for constructing a Digest from a hex string.
- hex
- Macro for converting sequence of string literals containing hex-encoded data into an array of bytes.
Structs§
- Digest
- Digest represents the results of a hashing function. It is always 256 bits of storage although depending on the hash it may have additional structure (for example Poseidon’s output is actually composed of field elements). The storage is in u32’s in part to simplify alignment requirements, especially in the zkVM.
Constants§
- DIGEST_
BYTES - Size of the Digest representation in bytes.
- DIGEST_
SHORTS - The number of shorts in the representation of a Digest.
- DIGEST_
WORDS - The number of words in the representation of a Digest.
- WORD_
SIZE - Size of a zkVM machine word in bytes. 4 bytes (i.e. 32 bits) as the zkVM is an implementation of the rv32im ISA.