pub fn encrypt(plaintext: &[u8], passphrase: &[u8]) -> Result<Vec<u8>, JsError>
Expand description
Encrypts plaintext and into a newly allocated Uint8Array.
This uses the default Argon2 parameters created by [Params::default].
§Errors
Returns Err if the Argon2 context is invalid.