Socket
Socket
Sign inDemoInstall

bcrypt

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bcrypt - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

build/Release/.deps/Release/bcrypt_lib.node.d

85

package.json
{
"name": "bcrypt",
"description": "A bcrypt library for NodeJS.",
"keywords": ["bcrypt","password","auth","authentication","encryption","crypt","crypto"],
"keywords": [
"bcrypt",
"password",
"auth",
"authentication",
"encryption",
"crypt",
"crypto"
],
"main": "./bcrypt",
"version": "0.7.0",
"version": "0.7.1",
"author": "Nick Campbell (http://github.com/ncb000gt)",
"engines": { "node": ">= 0.6.0" },
"engines": {
"node": ">= 0.6.0"
},
"repository": {
"type": "git",
"url": "http://github.com/ncb000gt/node.bcrypt.js.git"
},
"licenses": [
{
"type": "MIT"
}
],
"bugs": {
"url" : "http://github.com/ncb000gt/node.bcrypt.js/issues"
},
"scripts": {
"test": "make test"
},
"dependencies": {
"bindings": "1.0.0"
},
"devDependencies": {
"nodeunit": ">=0.6.4"
},
"contributors": [
"Antonio Salazar Cardozo <savedfastcool@gmail.com> (https://github.com/Shadowfiend)",
"Van Nguyen <the.gol.effect@gmail.com> (https://github.com/thegoleffect)",
"David Trejo <david@dtrejo.com> (https://github.com/dtrejo)",
"Ben Glow <glen.low@pixelglow.com> (https://github.com/pixelglow)",
"NewITFarmer.com <> (https://github.com/newitfarmer)",
"Alfred Westerveld <alfredwesterveld@gmail.com> (https://github.com/alfredwesterveld)",
"Vincent Côté-Roy <vincentcr@gmail.com> (https://github.com/vincentcr)",
"Lloyd Hilaiel <lloyd@hilaiel.com> (https://github.com/lloyd)",
"Roman Shtylman <shtylman@gmail.com> (https://github.com/shtylman)",
"Vadim Graboys <dimva13@gmail.com> (https://github.com/vadimg)",
"Ben Noorduis <> (https://github.com/bnoordhuis)"
]
"type": "git",
"url": "http://github.com/ncb000gt/node.bcrypt.js.git"
},
"licenses": [
{
"type": "MIT"
}
],
"bugs": {
"url": "http://github.com/ncb000gt/node.bcrypt.js/issues"
},
"scripts": {
"test": "node-gyp configure build && nodeunit test"
},
"dependencies": {
"bindings": "1.0.0"
},
"devDependencies": {
"nodeunit": ">=0.6.4"
},
"contributors": [
"Antonio Salazar Cardozo <savedfastcool@gmail.com> (https://github.com/Shadowfiend)",
"Van Nguyen <the.gol.effect@gmail.com> (https://github.com/thegoleffect)",
"David Trejo <david@dtrejo.com> (https://github.com/dtrejo)",
"Ben Glow <glen.low@pixelglow.com> (https://github.com/pixelglow)",
"NewITFarmer.com <> (https://github.com/newitfarmer)",
"Alfred Westerveld <alfredwesterveld@gmail.com> (https://github.com/alfredwesterveld)",
"Vincent Côté-Roy <vincentcr@gmail.com> (https://github.com/vincentcr)",
"Lloyd Hilaiel <lloyd@hilaiel.com> (https://github.com/lloyd)",
"Roman Shtylman <shtylman@gmail.com> (https://github.com/shtylman)",
"Vadim Graboys <dimva13@gmail.com> (https://github.com/vadimg)",
"Ben Noorduis <> (https://github.com/bnoordhuis)",
"Nate Rajlich <nathan@tootallnate.net> (https://github.com/tootallnate)",
"Sean McArthur <sean.monstar@gmail.com> (https://github.com/seanmonstar)",
"Fanie Oosthuysen <fanie.oosthuysen@gmail.com> (https://github.com/weareu)"
]
}

@@ -27,3 +27,5 @@ node.bcrypt.js

Windows users should make sure to have at least node 0.8.5 installed and version >= 0.7.1 of this module.
Security Issues/Concerns

@@ -43,2 +45,3 @@ =============

* OpenSSL (Development Libraries (header files) for compilation)
* For Windows you'll need http://slproweb.com/products/Win32OpenSSL.html installed to the default location of `C:\OpenSSL-Win32`

@@ -56,6 +59,8 @@ From NPM

git clone git://github.com/ncb000gt/node.bcrypt.js.git
cd node.bcrypt.js
node-gyp configure
node-gyp build
```
git clone git://github.com/ncb000gt/node.bcrypt.js.git
cd node.bcrypt.js
node-gyp configure
node-gyp build
```

@@ -69,16 +74,22 @@ Note: if you do not have node-gyp installed, install it using: `npm install -g node-gyp`

var bcrypt = require('bcrypt');
var salt = bcrypt.genSaltSync(10);
var hash = bcrypt.hashSync("B4c0/\/", salt);
// Store hash in your password DB.
```javascript
var bcrypt = require('bcrypt');
var salt = bcrypt.genSaltSync(10);
var hash = bcrypt.hashSync("B4c0/\/", salt);
// Store hash in your password DB.
```
To check a password:
// Load hash from your password DB.
bcrypt.compareSync("B4c0/\/", hash); // true
bcrypt.compareSync("not_bacon", hash); // false
```javascript
// Load hash from your password DB.
bcrypt.compareSync("B4c0/\/", hash); // true
bcrypt.compareSync("not_bacon", hash); // false
```
Auto-gen a salt and hash:
var hash = bcrypt.hashSync('bacon', 8)
```javascript
var hash = bcrypt.hashSync('bacon', 8);
```

@@ -90,23 +101,29 @@ Usage - Async

var bcrypt = require('bcrypt');
bcrypt.genSalt(10, function(err, salt) {
bcrypt.hash("B4c0/\/", salt, function(err, hash) {
// Store hash in your password DB.
});
```javascript
var bcrypt = require('bcrypt');
bcrypt.genSalt(10, function(err, salt) {
bcrypt.hash("B4c0/\/", salt, function(err, hash) {
// Store hash in your password DB.
});
});
```
To check a password:
// Load hash from your password DB.
bcrypt.compare("B4c0/\/", hash, function(err, res) {
// res == true
});
bcrypt.compare("not_bacon", hash, function(err, res) {
// res = false
});
```javascript
// Load hash from your password DB.
bcrypt.compare("B4c0/\/", hash, function(err, res) {
// res == true
});
bcrypt.compare("not_bacon", hash, function(err, res) {
// res = false
});
```
Auto-gen a salt and hash:
bcrypt.hash('bacon', 8, function(err, hash) {
});
```javascript
bcrypt.hash('bacon', 8, function(err, hash) {
});
```

@@ -157,6 +174,6 @@ API

I am using nodeunit. I like the way you write tests with it and I like the default output. As such you'll need it to run the tests. I suspect my tests would run on an older version, but these were written and worked against 0.5.1
If you create a pull request, tests better pass :)
npm install nodeunit@0.5.1
nodeunit test/
npm install
npm test

@@ -187,2 +204,5 @@ Credits

* [Ben Noordhuis][bnoordhuis] - Fixed a thread safety issue in nodejs that was perfectly mappable to this module.
* [Nate Rajlich][tootallnate] - Bindings and build process.
* [Sean McArthur][seanmonstar] - Windows Support
* [Fanie Oosthuysen][weareu] - Windows Support

@@ -214,1 +234,4 @@ License

[bnoordhuis]:https://github.com/bnoordhuis
[tootallnate]:https://github.com/tootallnate
[seanmonstar]:https://github.com/seanmonstar
[weareu]:https://github.com/weareu

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc