blake2b static method
Returns a Blake2b hash of the message.
Implementation
static Uint8List blake2b(dynamic message,
{int? digestSize,
Uint8List? key,
Uint8List? salt,
Uint8List? personalisation}) {
if (message is String) {
message = Uint8List.fromList(utf8.encode(message));
} else if (message is! Uint8List) {
throw Exception('The message must be either of string or Uint8List');
}
return Blake2b.digest(message as Uint8List,
digestSize: digestSize ?? defaultHashLength,
key: key,
salt: salt,
personal: personalisation);
}