open method

Uint8List open({
  1. required Uint8List msgToOpen,
  2. required Uint8List msgToAuth,
})

Decrypts a message using the next nonce in the sequence.

  • msgToOpen: The ciphertext to decrypt
  • msgToAuth: Additional authenticated data (must match what was used in seal)

Throws if decryption fails. A tampered or out-of-order ciphertext and a mismatched msgToAuth all fail alike.

Implementation

Uint8List open({
  required Uint8List msgToOpen,
  required Uint8List msgToAuth,
}) => _live.open(msgToOpen: msgToOpen, msgToAuth: msgToAuth);