encrypt

Function encrypt 

Source
pub fn encrypt<A, R>(
    pass: &Password,
    plaintext: &A,
    csprng: &mut R,
) -> EncryptedData
where A: AsRef<[u8]>, R: Rng,
Expand description

Encrypt the given plaintext using the provided password. This uses the AES256 cipher using PBKDF2SHA256 key derivation function using a randomly sampled salt. The number of rounds of the key derivation function is defined by the NUM_ROUNDS constant.