[−][src]Function tox_crypto::secretbox::xsalsa20poly1305::open
pub fn open(c: &[u8], n: &Nonce, k: &Key) -> Result<Vec<u8, Global>, ()>
open()
verifies and decrypts a ciphertext c
using a secret key k
and a nonce n
.
It returns a plaintext Ok(m)
.
If the ciphertext fails verification, open()
returns Err(())
.