calculateMac abstract method

Future<Mac> calculateMac(
  1. List<int> bytes, {
  2. required SecretKey secretKey,
  3. List<int> nonce = const <int>[],
  4. List<int> aad = const <int>[],
})

Calculates message authentication code.

The parameter secretKey must be non-empty.

The parameter nonce is optional and rarely required by MAC algorithms. The default value is const <int>[].

The parameter aad is Associated Authenticated Data (AAD). It can be empty. If it's non-empty and the algorithm does not support AAD, the the method throws ArgumentError.

Implementation

Future<Mac> calculateMac(
  List<int> bytes, {
  required SecretKey secretKey,
  List<int> nonce = const <int>[],
  List<int> aad = const <int>[],
});