crypto/crypto/hash/hash library
The hash library provides a collection of cryptographic hashing and HMAC (Hash-based Message Authentication Code) functions
for secure data integrity verification and password protection.
Supported Algorithms:
- SHA-256: Secure Hash Algorithm 256-bit.
- SHA-512: Secure Hash Algorithm 512-bit.
- HMAC: Hash-based Message Authentication Code for secure authentication.
- Blake2b: A high-speed cryptographic hash function.
- SHA-1: Secure Hash Algorithm 1.
- MD5: Message Digest Algorithm 5.
- MD4: Message Digest Algorithm 4.
- SHA-384: Secure Hash Algorithm 384-bit.
- Keccak: SHA-3, SHA-3/224, SHA-3/256, SHA-3/384, SHA-3/512, SHAKE128-256
- RIPEMD: RIPEMD-320, RIPEMD-256, RIPEMD-160, RIPEMD-128 -....
Classes
-
Absorbing<
F extends Object> -
BaseCommitDomain<
SCALAR extends PastaFieldElement< SCALAR> , BASE extends PastaFieldElement<BASE> , P extends PastaPoint<SCALAR, BASE, P> , AFFINE extends PastaAffinePoint<SCALAR, BASE, P> > -
BaseHashDomain<
SCALAR extends PastaFieldElement< SCALAR> , BASE extends PastaFieldElement<BASE> , P extends PastaPoint<SCALAR, BASE, P> , AFFINE extends PastaAffinePoint<SCALAR, BASE, P> > -
BasePedersenHash<
T extends JubJubScalar< T> , E extends BaseJubJubPoint<T, E> > - BLAKE2b
- Implementation of the BLAKE2b hash function that implements the SerializableHash interface.
- Blake2Config
- Configuration class for the Blake2b hash function.
- BLAKE2s
- Implementation of the BLAKE2s hash function that implements the SerializableHash interface.
- Blake2State
- Serializable snapshot of an in-progress BLAKE2b computation.
- CommitDomain
- A Sinsemilla commitment domain over the Pallas curve.
- DartHashApi
- HashApi backed by this package's pure-Dart hash implementations.
-
Grain<
F extends PastaFieldElement< F> > - The Grain LFSR used to derive Poseidon round constants.
- Hash
-
The
Hashabstract class defines the basic operations for hash algorithms. - HashApi
- Constructs hash and HMAC instances for the supported algorithms.
- HashBytesState
-
The
HashBytesStateclass represents the state of a hashing process that operates on a byte array. - HashDomain
- HashDomainConst
- Domain-separation constants for Sinsemilla hashing.
- HashState
-
The
HashStateabstract class serves as a marker interface for hash state classes. - HMAC
-
The
HMACclass represents a Hash-based Message Authentication Code. - HMACState
- Serializable snapshot of an in-progress HMAC computation.
- Keccak
- KeccakState
- Serializable snapshot of an in-progress Keccak computation.
- MD4
- Implementation of the MD4 (Message Digest 4) hash function.
- MD5
- A class that represents the MD5 hash algorithm, which is used to compute MD5 message digests. This class implements the SerializableHash interface.
-
MdsGenerateResult<
F extends PastaFieldElement< F> > - The MDS matrix and its inverse, produced during Poseidon setup.
- NativeHashApi
- HashApi backed by a native (FFI/platform) implementation.
- P128Pow5T3Fp
- P128Pow5T3Fq
- PedersenHash
- The Pedersen hash over JubJub.
- PedersenUtils
- Precomputed generators and helpers for the Pedersen hash.
- Personalization
- PersonalizationMerkleTree
- PersonalizationNoteCommitment
-
PoseidonHash<
F extends PastaFieldElement< F> > - The Poseidon algebraic hash function.
-
PoseidonHashDomain<
F extends PastaFieldElement< F> > - Domain separation for a PoseidonHash.
-
PoseidonSpec<
F extends PastaFieldElement< F> > - PoseidonUtils
- Helpers for deriving Poseidon round constants and MDS matrices.
- RIPEMD128
-
A class representing the RIPEMD-128 hash algorithm, extending the
_RIPEMDbase class. - RIPEMD160
-
A class representing the RIPEMD-160 hash algorithm, extending the
_RIPEMDbase class. - RIPEMD256
-
A class representing the RIPEMD-256 hash algorithm, extending the
_RIPEMDbase class. - RIPEMD320
-
A class representing the RIPEMD-320 hash algorithm, extending the
_RIPEMDbase class. -
SerializableHash<
T extends BuHashState> -
The
SerializableHashabstract class extends theHashclass and adds functionality for saving, restoring, and cleaning hash states. - SH1State
- The SH1State class represents the state of the SHA-1 hash algorithm.
- SHA1
- A class representing the SHA-1 (Secure Hash Algorithm 1) hash algorithm.
- SHA224
-
The
SHA224class represents the SHA-224 hash algorithm, which is a variant of SHA-256. - SHA256
- The SHA256 class represents the SHA-256 hash algorithm.
- SHA256State
- Serializable snapshot of an in-progress SHA-256 computation.
- SHA3
-
The
SHA3class is used to compute hash digests of data, and it allows customization of the digest length - SHA3224
- The SHA3224 class represents a specific implementation of the SHA-3 (Secure Hash Algorithm 3) hash function with a digest length of 224 bits (28 bytes).
- SHA3256
- The SHA3256 class represents a specific implementation of the SHA-3 (Secure Hash Algorithm 3) hash function with a digest length of 256 bits (32 bytes).
- SHA3384
- The SHA3384 class represents a specific implementation of the SHA-3 (Secure Hash Algorithm 3) hash function with a digest length of 384 bits (48 bytes).
- SHA3512
- The SHA3512 class represents a specific implementation of the SHA-3 (Secure Hash Algorithm 3) hash function with a digest length of 512 bits (64 bytes).
- SHA384
-
The
SHA384class extends the SHA-512 hash algorithm to produce 384-bit digests. - SHA512
-
The
SHA512class implements the SHA-512 hash algorithm. - SHA512256
- The SHA512256 class extends the SHA-512 hash function, specifically truncating its output to 256 bits (32 bytes). It inherits the implementation of the SHA-512 hash algorithm
- SHA512State
-
The
SHA512Stateclass represents the state of a SHA-512 hash calculation. - SHAKE
- The SHAKE class represents the SHAKE (Secure Hash Algorithm KEccak) extendable-output hash function.
- SHAKE128
- SHAKE128 is an implementation of the SHAKE128 extendable-output function.
- SHAKE256
- SHAKE256 is an implementation of the SHAKE256 extendable-output function.
- SinsemillaConst
- SinsemillaPad
- Pads the given iterator
-
Sponge<
F extends PastaFieldElement< F> > - Sponge construction driving a Poseidon permutation.
-
SpongeMode<
F extends Object> -
Squeezing<
F extends Object> - ValidatedHashApi
- HashApi wrapper that validates arguments before delegating.
- XXHash
- xxHash: a fast, non-cryptographic hash. Do not use where collision resistance matters.
Enums
- FieldType
- Which prime field a Poseidon instance operates over.
- KeccakFamily
- SboxType
- Which S-box a Poseidon instance uses.
Typedefs
-
CbHashFunc<
T extends BuHashState> = BuSerializableHash< T> Function()