1.0.4 • Published 5 years ago
non-blocking-bcrypt-nodejs v1.0.4
npm install non-blocking-bcrypt-nodejs --save
lets jump to some examples
const bcrypt = require('non-blocking-bcrypt-nodejs')
(async () =>{
try {
const {salt} = await bcrypt.genSalt()
}
catch(err){
}
})();
const bcrypt = require('non-blocking-bcrypt-nodejs')
(async () =>{
try {
const {salt} = await nonBlockingBcrypt.genSalt();
const {hash} = await nonBlockingBcrypt.genHash(salt, 'sdsasdsafasf');
}
catch(err){
}
})();
const bcrypt = require('non-blocking-bcrypt-nodejs')
(async () =>{
try {
const {hash} = await nonBlockingBcrypt.saltAndHash( 'sdsasdsafasf');
}
catch(err){
}
})();
const bcrypt = require('non-blocking-bcrypt-nodejs')
(async () =>{
try {
const {salt} = await nonBlockingBcrypt.genSalt();
const {hash} = await nonBlockingBcrypt.genHash(salt, 'sdsasdsafasf');
const match = await nonBlockingBcrypt.compare('sdsasdsafasf', hash);
}
catch(err){
}
})();
npm test