[][src]Function tox_crypto::open_detached

pub fn open_detached(
    c: &mut [u8],
    mac: &Tag,
    n: &Nonce,
    pk: &PublicKey,
    sk: &SecretKey
) -> Result<(), ()>

open_detached() verifies and decrypts a ciphertext c using the receiver's secret key sk, the senders public key pk, and a nonce n. c is decrypted in place, so if this function is successful it will contain the plaintext. If the ciphertext fails verification, open_detached() returns Err(()), and the ciphertext is not modified.