Function sodiumoxide::crypto::box_::curve25519xsalsa20poly1305::open [] [src]

pub fn open(c: &[u8],
            Nonce: &Nonce,
            PublicKey: &PublicKey,
            SecretKey: &SecretKey)
            -> Result<Vec<u8>, ()>

open() verifies and decrypts a ciphertext c using the receiver's secret key sk, the senders public key pk, and a nonce n. It returns a plaintext Ok(m). If the ciphertext fails verification, open() returns Err(()).