How to use the pbe function from node-forge
Find comprehensive JavaScript node-forge.pbe code examples handpicked from public code repositorys.
28 29 30 31 32 33 34 35 36 37
function aesCbcPassphraseEncryptToBase64(password, data) { var keySize = 32; var ivSize = 16; var salt = generateRandomSalt8Byte(); var derivedBytes = forge.pbe.opensslDeriveBytes( password, salt, keySize + ivSize); var buffer = forge.util.createBuffer(derivedBytes); var key = buffer.getBytes(keySize); var iv = buffer.getBytes(ivSize);
13
38
6
+ 15 other calls in file
node-forge.pki is the most popular function in node-forge (10287 examples)