non-blocking-bcrypt-nodejs
v1.0.4
Published
warper for bcrypt-nodejs that works on a difrrent thread to keep the crypto actions from starving the event loop.
Downloads
13
Maintainers
Readme
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