git ssb

0+

cel-desktop / ssb-pkg



Tree: 65191f9a9664f013ebe726bb95a1a54b086e1bd5

Files: 65191f9a9664f013ebe726bb95a1a54b086e1bd5 / test / test-79-npm / bcrypt / bcrypt.js

347 bytesRaw
1'use strict';
2
3var bcrypt = require('bcrypt');
4var saltRounds = 10;
5var myPlaintextPassword = 'P4$$w0rD';
6bcrypt.genSalt(saltRounds, function (error, salt) {
7 if (error) return;
8 bcrypt.hash(myPlaintextPassword, salt, function (error2, hash) {
9 if (error2) return;
10 if (typeof hash === 'string') {
11 console.log('ok');
12 }
13 });
14});
15

Built with git-ssb-web