compute static method
Computes HMAC-SHA512.
key - The secret key
data - The message to authenticate
Returns a 64-byte (512-bit) MAC.
Implementation
static Uint8List compute(Uint8List key, Uint8List data) {
final hmac = crypto.Hmac(crypto.sha512, key);
final digest = hmac.convert(data);
return Uint8List.fromList(digest.bytes);
}