Skip to main content

crypto_secretbox_detached

Function crypto_secretbox_detached 

Source
pub fn crypto_secretbox_detached(
    ciphertext: &mut [u8],
    mac: &mut Mac,
    message: &[u8],
    nonce: &Nonce,
    key: &Key,
) -> Result<(), Error>
Expand description

Detached version of crypto_secretbox_easy.

Compatible with libsodium’s crypto_secretbox_detached.

§Errors

Returns an error if message is too long or ciphertext is shorter than message.