ValidatedHashApi class

HashApi wrapper that validates arguments before delegating.

Implemented types

Constructors

ValidatedHashApi(HashApi inner)
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
inner → HashApi
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

blake2b({int digestLength = 64, Blake2Config? config}) → BuSerializableHash<BuHashState>
BLAKE2b with digestLength 1..64 bytes (default 64). Throws on out-of-range length.
override
blake2s({int digestLength = 32, Blake2Config? config}) → BuSerializableHash<BuHashState>
BLAKE2s with digestLength 1..32 bytes (default 32). Throws on out-of-range length.
override
hmacSha256(List<int> key) → BuSerializableHash<BuHashState>
HMAC HMAC-SHA-256 with arbitrary-length key.
override
hmacSha384(List<int> key) → BuSerializableHash<BuHashState>
HMAC-SHA-384 with arbitrary-length key.
override
hmacSha512(List<int> key) → BuSerializableHash<BuHashState>
HMAC-SHA-512 with arbitrary-length key.
override
keccak({int digestLength = 64}) → BuSerializableHash<BuHashState>
Keccak with digestLength 1..64 bytes (default 64 in interface, 32 in Dart backend). Throws on out-of-range length.
override
keccakF1600(BuBytes src) → BuBytes
Applies the Keccak-f1600 permutation to 200-byte state src. Returns 200-byte state. Throws on crypto failure.
override
md4() → BuSerializableHash<BuHashState>
MD4, 16-byte digest.
override
md5() → BuSerializableHash<BuHashState>
MD5, 16-byte digest.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pedersenHash({required int personal, int layer = 0, required BuBytes packedBits, required int bitLen}) → BuBytes
Pedersen hash over packed LSB-first bits → 32-byte Jubjub compressed. personal selects the generator set (0 = note commitment, 1 = Merkle tree at layer); bitLen is the number of significant bits in packedBits. Routes to the active backend (pure-Dart PedersenHash, or native Rust). Throws on crypto failure.
override
pedersenHashBitstring({required int personal, int layer = 0, required List<bool> bits}) → BuBytes
Pedersen hash of a bit list. Same routing as pedersenHash.
override
poseidonBn254Hash(List<int> inputs) → BuBytes
circomlib-compatible Poseidon over BN254 Fr (Sui zkLogin / Aptos keyless). inputs is concatenated 32-byte LE Fr elements (1..64); returns the 32-byte LE digest. Native backends built without the Rust poseidon-bn254 feature throw unsupported.
override
pseudoRando({required List<int> nk, required List<int> rho}) → BuBytes
PRF^nfOrchard(nk, ρ) := Poseidon(nk, ρ) — LE Fp in/out (32 bytes).
override
ripemd128() → BuSerializableHash<BuHashState>
RIPEMD-128, 16-byte digest.
override
ripemd160() → BuSerializableHash<BuHashState>
RIPEMD-160, 20-byte digest.
override
ripemd256() → BuSerializableHash<BuHashState>
RIPEMD-256, 32-byte digest.
override
ripemd320() → BuSerializableHash<BuHashState>
RIPEMD-320, 40-byte digest.
override
sha1() → BuSerializableHash<BuHashState>
SHA-1, 20-byte digest.
override
sha224() → BuSerializableHash<BuHashState>
SHA-224, 28-byte digest.
override
sha256() → BuSerializableHash<BuHashState>
SHA-256, 32-byte digest.
override
sha3({int digestLength = 32}) → BuSerializableHash<BuHashState>
SHA-3 with digestLength 1..64 bytes (default 32). Throws on out-of-range length.
override
sha384() → BuSerializableHash<BuHashState>
SHA-384, 48-byte digest.
override
sha512() → BuSerializableHash<BuHashState>
SHA-512, 64-byte digest.
override
sha512256() → BuSerializableHash<BuHashState>
SHA-512/256, 32-byte digest.
override
shake128() → BuSerializableHash<BuHashState>
SHAKE128 extendable output.
override
shake256() → BuSerializableHash<BuHashState>
SHAKE256 extendable output.
override
sinsemillaCommit({required List<int> r, required List<bool> bits, String domain = 'z.cash:Orchard-CommitIvk'}) → BuBytes?
Full Sinsemilla commit → Pasta compressed point, or null as above.
override
sinsemillaShortCommit({required List<int> r, required List<bool> bits, String domain = 'z.cash:Orchard-CommitIvk'}) → BuBytes?
Sinsemilla shortCommit → LE Fp x, or null only when commit is undefined (Dart incomplete-point / Rust sinsemilla_null). Other failures throw.
override
toString() → String
A string representation of this object.
inherited
xxHash({int bitLength = 64}) → BuSerializableHash<BuHashState>
XXHash with bitLength 64, 128 or 256 (default 64). Throws on other bit lengths.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited