initializeSync method

  1. @override
void initializeSync({
  1. required SecretKeyData secretKey,
  2. required List<int> nonce,
  3. List<int> aad = const [],
})
override

Re-initializes the sink.

Implementation

@override
void initializeSync({
  required SecretKeyData secretKey,
  required List<int> nonce,
  List<int> aad = const [],
}) {
  _aadLength = 0;
  _tmpAsUint8List.fillRange(0, _tmpAsUint8List.length, 0);
  secretKey = deriveSecretKey(
    secretKey: secretKey,
    nonce: nonce,
  );
  super.initializeSync(
    secretKey: secretKey,
    nonce: nonce,
    aad: aad,
  );
}