pub fn encrypt_with_context<'a>(
plaintext: &[u8],
passphrase: &[u8],
argon2_type: u32,
argon2_version: u32,
memory_cost: u32,
time_cost: u32,
parallelism: u32,
) -> PyResult<Cow<'a, [u8]>>
Expand description
Encrypts plaintext
with the specified Argon2 type, Argon2 version and
Argon2 parameters and into a newly allocated bytes
.
ยงErrors
Returns an error if any of the following are true:
- The Argon2 type is invalid.
- The Argon2 version is invalid.
- The Argon2 parameters are invalid.
- The Argon2 context is invalid.