MacCryptRaw constructor

MacCryptRaw({
  1. required Uint8List key,
  2. required MacType type,
  3. HmacHash? algorithm,
})

Implementation

MacCryptRaw(
    {required Uint8List key, required MacType type, HmacHash? algorithm})
    : _type = type {
  if (_type == MacType.HMAC) {
    _mac = HMAC(key, algorithm!);
  } else if (_type == MacType.Poly1305) {
    _mac = poly.Poly1305(key);
  } else {
    _mac = CMAC(key);
  }
}