compute static method

Uint8List compute(
  1. Uint8List key,
  2. Uint8List data
)

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);
}