pub fn encrypt(
plaintext: &[u8],
nonce_slice: &[u8],
key_slice: &[u8],
) -> Vec<u8> ⓘ
Expand description
Encrypts the given plaintext with the given key and nonce. The key must be 32 bytes long and the nonce must be 12 bytes long. The ciphertext is returned as a vector of bytes.
§Examples
use nutek_cipher_lib::aes_gcm_siv::encrypt;
fn main() {
encrypt(b"hello world", b"123456123456", b"12345678123456781234567812345678");
}