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