Skip to main content

encrypt

Function encrypt 

Source
pub fn encrypt<R: RngCore + CryptoRng, const ENCRYPTION_SIZE: usize>(
    shared_secret_key: &JubJubAffine,
    salt: &[u8],
    plaintext: &[u8],
    rng: &mut R,
) -> Result<[u8; ENCRYPTION_SIZE], Error>
Expand description

Encrypts a plaintext given a shared DH secret key, returning a vector containing a nonce and the ciphertext (which includes the tag)