open method

  1. @override
Uint8List open(
  1. Uint8List nonceAndCiphertext,
  2. Uint8List key
)
override

Implementation

@override
Uint8List open(Uint8List nonceAndCiphertext, Uint8List key) {
  var nonce =
      nonceAndCiphertext.sublist(0, sodium!.crypto.secretBox.nonceBytes);
  var ciphertext =
      nonceAndCiphertext.sublist(sodium!.crypto.secretBox.nonceBytes);

  return sodium!.crypto.secretBox.openEasy(
      cipherText: ciphertext,
      nonce: nonce,
      key: SecureKey.fromList(sodium!, key));
}