Skip to main content

crypto_box_open_detached_afternm

Function crypto_box_open_detached_afternm 

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

Precalculation variant of crypto_box_open_detached.

Compatible with libsodium’s crypto_box_open_detached_afternm.

§Errors

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