DartHashApi class
HashApi backed by this package's pure-Dart hash implementations.
- Implemented types
Constructors
-
DartHashApi({List<
PallasPoint> ? sinsemillaS, PoseidonSpec<PallasFp> ? poseidonSpec})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
blake2b(
{int digestLength = 64, Blake2Config? config}) → SerializableHash< Blake2State> -
BLAKE2b with
digestLength1..64 bytes (default 64). Throws on out-of-range length.override -
blake2s(
{int digestLength = 32, Blake2Config? config}) → SerializableHash< Blake2State> -
BLAKE2s with
digestLength1..32 bytes (default 32). Throws on out-of-range length.override -
hmacSha256(
List< int> key) → SerializableHash<BuHashState> -
HMAC
HMAC-SHA-256 with arbitrary-length
key.override -
hmacSha384(
List< int> key) → SerializableHash<BuHashState> -
HMAC-SHA-384 with arbitrary-length
key.override -
hmacSha512(
List< int> key) → SerializableHash<BuHashState> -
HMAC-SHA-512 with arbitrary-length
key.override -
keccak(
{int digestLength = 32}) → SerializableHash< KeccakState> -
Keccak with
digestLength1..64 bytes (default 64 in interface, 32 in Dart backend). Throws on out-of-range length.override -
keccakF1600(
BuBytes src) → BuBytes -
Applies the Keccak-f
1600permutation to 200-byte statesrc. Returns 200-byte state. Throws on crypto failure.override -
md4(
) → SerializableHash< SH1State> -
MD4, 16-byte digest.
override
-
md5(
) → SerializableHash< SH1State> -
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.
personalselects the generator set (0= note commitment,1= Merkle tree atlayer);bitLenis the number of significant bits inpackedBits. 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).
inputsis concatenated 32-byte LE Fr elements (1..64); returns the 32-byte LE digest. Native backends built without the Rustposeidon-bn254feature 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(
) → SerializableHash< SH1State> -
RIPEMD-128, 16-byte digest.
override
-
ripemd160(
) → SerializableHash< SH1State> -
RIPEMD-160, 20-byte digest.
override
-
ripemd256(
) → SerializableHash< SH1State> -
RIPEMD-256, 32-byte digest.
override
-
ripemd320(
) → SerializableHash< SH1State> -
RIPEMD-320, 40-byte digest.
override
-
sha1(
) → SerializableHash< SH1State> -
SHA-1, 20-byte digest.
override
-
sha224(
) → SerializableHash< SHA256State> -
SHA-224, 28-byte digest.
override
-
sha256(
) → SerializableHash< SHA256State> -
SHA-256, 32-byte digest.
override
-
sha3(
{int digestLength = 32}) → SerializableHash< KeccakState> -
SHA-3 with
digestLength1..64 bytes (default 32). Throws on out-of-range length.override -
sha384(
) → SerializableHash< SHA512State> -
SHA-384, 48-byte digest.
override
-
sha512(
) → SerializableHash< SHA512State> -
SHA-512, 64-byte digest.
override
-
sha512256(
) → SerializableHash< SHA512State> -
SHA-512/256, 32-byte digest.
override
-
shake128(
) → SerializableHash< KeccakState> -
SHAKE128 extendable output.
override
-
shake256(
) → SerializableHash< KeccakState> -
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
nullas above.override -
sinsemillaShortCommit(
{required List< int> r, required List<bool> bits, String domain = 'z.cash:Orchard-CommitIvk'}) → BuBytes? -
Sinsemilla shortCommit → LE Fp x, or
nullonly when commit is undefined (Dart incomplete-point / Rustsinsemilla_null). Other failures throw.override -
toString(
) → String -
A string representation of this object.
inherited
-
xxHash(
{int bitLength = 64}) → SerializableHash< HashBytesState> -
XXHash with
bitLength64, 128 or 256 (default 64). Throws on other bit lengths.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited