pub fn encrypt(plain_text: &[u8], password: &str) -> Result<Vec<u8>, JsValue>
Expand description

Encrypts the plaintext with a password. Make sure the password is not weak. A random nonce is generated for each call so each time the same plaintext is encrypted with the same password, the result is a different ciphertext. The ciphertext returned will be 40 bytes longer than the plaintext.

@see decrypt