Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. const crypto = require('crypto');
  2. let key = Buffer.from('MYKEY', 'utf8');
  3. const cipher = crypto.createCipher('des-ede3-cbc', key);
  4. password = Buffer.from('MYPASS', 'utf8');
  5.  
  6. let encrypted = [cipher.update(password)];
  7. encrypted.push(cipher.final());
  8. encrypted = Buffer.concat(encryptedArr);
  9. console.log(encrypted.toString('hex'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement