The data to be encrypted.
The initialization vector.
The password for encryption.
The salt for key derivation.
The encrypted data.
const data = 'Sensitive information';
const iv = '1234567890123456'; // 16 characters
const password = 'MySecretPassword';
const salt = 'MySalt';
const encrypted = encrypt(data, iv, password, salt);
console.log(encrypted);
Generated using TypeDoc
Encrypts data using the given parameters.