Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qard/node-isolated-bcrypt
Move bcrypt to a child process via a golang executable due to it not working in node 0.11
https://github.com/qard/node-isolated-bcrypt
Last synced: 12 days ago
JSON representation
Move bcrypt to a child process via a golang executable due to it not working in node 0.11
- Host: GitHub
- URL: https://github.com/qard/node-isolated-bcrypt
- Owner: Qard
- Created: 2014-02-04T03:06:40.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-02-13T03:35:23.000Z (almost 6 years ago)
- Last Synced: 2024-10-19T19:55:39.729Z (about 1 month ago)
- Language: JavaScript
- Size: 7.86 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# isolated-bcrypt
This is a dirty, dirty hack around bcrypt being horribly broken in node 0.11.
You probably shouldn't use this in production.# Recommended usage
var bcrypt;
try {
bcrypt = require('bcrypt')
} catch (e) {
bcrypt = require('isolated-bcrypt')
}bcrypt.hash(password, rounds, function (err, hashed) {
bcrypt.compare(password, hashed, function (err, same) {
console.log('passwords match?', same)
})
})# Notes
I haven't bothered implementing the longer genSalt method. Nag me if you think
you need it.