Skip to main content

Crate ps_hash_core

Crate ps_hash_core 

Source

Modules§

encoding
The two textual representations of a Hash.

Structs§

Hash
PackedInt
An unsigned integer packed into 16 bits with variable precision.

Enums§

HashError
HashValidationError

Constants§

DIGEST_SIZE
Size of the digest, in bytes.
HASH_SIZE_BASE64
Size of the base64url representation, in characters.
HASH_SIZE_BIN
Size of the internal representation, in bytes.
HASH_SIZE_COMPACT
Size of the truncated binary representation, in bytes.
HASH_SIZE_CROCKFORD
Size of the Crockford Base32 representation, in characters.
MIN_RECOVERABLE_BASE64
Shortest base64url input Hash::validate accepts.
MIN_RECOVERABLE_BIN
Shortest binary input Hash::validate accepts.
MIN_RECOVERABLE_CROCKFORD
Shortest Crockford Base32 input Hash::validate accepts.
PARITY
Number of byte errors the Reed-Solomon codec can correct.
PARITY_OFFSET
Offset of the parity block within the internal representation.
PARITY_SIZE
Size of the Reed-Solomon parity block, in bytes.
RS
SIZE_SIZE
Size of the packed data-length field, in bytes.

Functions§

blake3
hash
hash_encoded
Hashes data and encodes it in the canonical Crockford Base32 form.
hash_inner
inner_from_parts
Assembles the internal representation from its stored parts, regenerating the parity block.
sha256