calculateMac method
Future<Mac>
calculateMac(
- List<
int> bytes, { - required SecretKey secretKey,
- List<
int> nonce = const <int>[], - List<
int> aad = const <int>[],
override
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
@override
Future<Mac> calculateMac(
List<int> bytes, {
required SecretKey secretKey,
List<int> nonce = const <int>[],
List<int> aad = const <int>[],
}) {
throw UnsupportedError(
'AES-GCM MAC algorithm can NOT be called separately.',
);
}