Function sodiumoxide::crypto::aead::chacha20poly1305_ietf::seal_detached
[−]
[src]
pub fn seal_detached(m: &mut [u8], ad: Option<&[u8]>, n: &Nonce, k: &Key) -> Tag
seal_detached()
encrypts and authenticates a message m
together with optional plaintext data ad
using a secret key k
and a nonce n
.
m
is encrypted in place, so after this function returns it will contain the ciphertext.
The detached authentication tag is returned by value.