Function abcrypt_wasm::encrypt

source ·
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.

§Errors

Returns Err if the Argon2 context is invalid.