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);
fork icon13
star icon38
watch icon6

+ 15 other calls in file