aesEncrypt method

  1. @override
Future<SealedBox> aesEncrypt({
  1. required Uint8List plaintext,
  2. required Uint8List key,
  3. required Uint8List nonce,
})
override

Implementation

@override
Future<SealedBox> aesEncrypt(
    {required Uint8List plaintext,
    required Uint8List key,
    required Uint8List nonce}) async {
  final res = (await methodChannel.invokeMapMethod<String, dynamic>(
      'aesEncrypt', {'plaintext': plaintext, 'key': key, 'nonce': nonce}))!;
  return SealedBox(res['ciphertext'] as Uint8List, res['mac'] as Uint8List);
}