Blake2b constructor
Blake2b({
- int digestLength = 32,
- Uint8List? key,
- Uint8List? salt,
- Uint8List? personalization,
- Uint64List? iv,
The BLAKE2s (32-bit) flavor of the BLAKE2 cryptographic hash function.
digestLength must not be null and must be > 0
.
key may be null, but if set, it will be used for the first round of compression.
salt, personalization, and iv may be null
or must == 8
characters in length.
Implementation
Blake2b({
this.digestLength = 32,
this.key,
this.salt,
this.personalization,
this.iv,
}) : assert( digestLength > 0 && digestLength <= 32),
assert(salt == null || salt.length == 8),
assert(personalization == null || personalization.length == 8),
assert(iv == null || iv.length == 8) {
iv ??= Uint64List.fromList(<int>[
0x6a09e667f3bcc908, 0xbb67ae8584caa73b,
0x3c6ef372fe94f82b, 0xa54ff53a5f1d36f1,
0x510e527fade682d1, 0x9b05688c2b3e6c1f,
0x1f83d9abfb41bd6b, 0x5be0cd19137e2179,
]);
reset();
}