newMacSinkSync method

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

Returns DartMacSinkMixin, which can be used synchronously.

Implementation

@override
DartMacSinkMixin newMacSinkSync({
  required SecretKeyData secretKeyData,
  List<int> nonce = const <int>[],
  List<int> aad = const <int>[],
}) {
  final sink = _DartHmacSink(
    hashAlgorithm,
    Uint8List(hashAlgorithm.blockLengthInBytes),
    hashAlgorithm.toSync().newHashSink(),
    hashAlgorithm.toSync().newHashSink(),
  );
  sink.initializeSync(
    secretKey: secretKeyData,
    nonce: nonce,
  );
  return sink;
}