generic_hash library

Fingerprint messages (eg files). Maps libsodium's crypto_generichash_* api

Classes

GenericHashStream
Generates hash for a multi-part message

Properties

genericHashBytes int
final
genericHashBytesMax int
final
genericHashBytesMin int
final
keyBytes int
final
keyBytesMax int
final
keyBytesMin int
final

Functions

genericHash(Uint8List input, {Uint8List key, int outLength}) Uint8List
Generate a fingerprint for input. A different key (optional) produces a different fingerprint for the same input. key (when provided) must be between keyBytesMin and keyBytesMax long (recommended keyBytes). outLength (optional) controls the length of the generated hash and must be between genericHashBytesMin and genericHashBytesMax long (standart genericHashBytes). Throws GenericHashError when generating fingerprint fails. [...]
keyGen() UnmodifiableUint8ListView
Generates a key for generic hash.

Exceptions / Errors

FinalizeStreamError
GenericHashError
InitStreamError
UpdateStreamError