hmac method

Future<Uint8List> hmac(
  1. String hashAlgorithm,
  2. Uint8List key,
  3. Uint8List data
)

Implementation

Future<Uint8List> hmac(String hashAlgorithm, Uint8List key, Uint8List data) {
  if (hashAlgorithm.toUpperCase() == 'SHA-1') {
    return hmacSha1(key, data);
  }
  return hmacSha256(key, data);
}