decrypt method

  1. @override
Future<Uint8List> decrypt(
  1. Uint8List input
)
override

Implementation

@override
Future<Uint8List> decrypt(Uint8List input) async {
  var secretBox = SecretBox.fromConcatenation(
    input,
    nonceLength: AesGcm.defaultNonceLength,
    macLength: 16,
  );

  return Uint8List.fromList(await algorithm.decrypt(
    secretBox,
    secretKey: await secretKey,
  ));
}