newMacSinkSync method
DartPoly1305Sink
newMacSinkSync({
- required SecretKeyData secretKeyData,
- List<
int> nonce = const <int>[], - List<
int> aad = const <int>[],
override
Returns DartMacSinkMixin, which can be used synchronously.
Implementation
@override
DartPoly1305Sink newMacSinkSync({
required SecretKeyData secretKeyData,
List<int> nonce = const <int>[],
List<int> aad = const <int>[],
}) {
if (aad.isNotEmpty) {
throw ArgumentError.value(
aad,
'aad',
'AAD is not supported',
);
}
final result = DartPoly1305Sink();
result.initializeSync(
secretKey: secretKeyData,
nonce: nonce,
aad: aad,
);
return result;
}