calculateMacSync method

  1. @override
Mac calculateMacSync(
  1. List<int> bytes, {
  2. required SecretKeyData secretKeyData,
  3. required List<int> nonce,
  4. List<int> aad = const <int>[],
})
override

Computes a MAC synchronously (unlike calculateMac).

Implementation

@override
Mac calculateMacSync(
  List<int> bytes, {
  // TODO: A breaking change: Rename parameter as `secretKey` for consistency?
  required SecretKeyData secretKeyData,
  required List<int> nonce,
  List<int> aad = const <int>[],
}) {
  final sink = newMacSinkSync(
    secretKeyData: secretKeyData,
    nonce: nonce,
    aad: aad,
  );
  sink.addSlice(bytes, 0, bytes.length, true);
  return sink.macSync();
}