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 as int);
  var ciphertext =
      nonceAndCiphertext.sublist(sodium.crypto_secretbox_NONCEBYTES as int);

  return sodium.crypto_secretbox_open_easy(ciphertext, nonce, key);
}