Skip to main content

encrypt

Function encrypt 

Source
pub fn encrypt(
    plaintext: &[u8],
    key: &EncryptionKey,
) -> Result<Vec<u8>, CryptoError>
Expand description

Encrypt with a provided key (non-CHK, random nonce)

Returns: [12-byte nonce][ciphertext][16-byte auth tag]