Skip to main content

encrypt

Function encrypt 

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

Encrypt plaintext with a 32-byte key.

Returns the nonce prepended to the ciphertext (nonce || ciphertext).