Comparing version 0.7.8 to 0.8.0
@@ -14,3 +14,3 @@ { | ||
"main": "./bcrypt", | ||
"version": "0.7.8", | ||
"version": "0.8.0", | ||
"author": "Nick Campbell (https://github.com/ncb000gt)", | ||
@@ -36,3 +36,4 @@ "engines": { | ||
"dependencies": { | ||
"bindings": "1.0.0" | ||
"bindings": "1.0.0", | ||
"nan": "1.3.0" | ||
}, | ||
@@ -58,2 +59,2 @@ "devDependencies": { | ||
] | ||
} | ||
} |
# node.bcrypt.js | ||
[![Build Status](https://secure.travis-ci.org/ncb000gt/node.bcrypt.js.png)](http://travis-ci.org/#!/ncb000gt/node.bcrypt.js) | ||
[![Build Status](https://secure.travis-ci.org/ncb000gt/node.bcrypt.js.svg)](http://travis-ci.org/#!/ncb000gt/node.bcrypt.js) | ||
@@ -24,9 +24,10 @@ Lib to help you hash passwords. | ||
Windows users should make sure to have at least node 0.8.5 installed and version >= 0.7.1 of this module. | ||
Windows users should make sure to have at least node 0.8.5 installed and version >= 0.7.1 of this module. | ||
`node-gyp` only works with stable/released versions of node. Since the `bcrypt` module uses `node-gyp` to build and install you'll need a stable version of node to use bcrypt. If you do not you'll likely see an error that starts with: | ||
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead | ||
``` | ||
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead | ||
``` | ||
## Security Issues/Concerns | ||
@@ -47,2 +48,3 @@ | ||
* Python 2.x | ||
* `OpenSSL` - This is only required to build the `bcrypt` project if you are using versions <= 0.7.7. Otherwise, we're using the builtin node crypto bindings for seed data (which use the same OpenSSL code paths we were, but don't have the external dependency). | ||
@@ -79,3 +81,3 @@ ## Install via NPM | ||
bcrypt.compare("not_bacon", hash, function(err, res) { | ||
// res = false | ||
// res == false | ||
}); | ||
@@ -122,5 +124,5 @@ ``` | ||
* `genSaltSync(rounds)` | ||
* `rounds` - [OPTIONAL] - the number of rounds to process the data for. (default - 10) | ||
* `rounds` - [OPTIONAL] - the cost of processing the data. (default - 10) | ||
* `genSalt(rounds, cb)` | ||
* `rounds` - [OPTIONAL] - the number of rounds to process the data for. (default - 10) | ||
* `rounds` - [OPTIONAL] - the cost of processing the data. (default - 10) | ||
* `cb` - [REQUIRED] - a callback to be fired once the salt has been generated. uses eio making it asynchronous. | ||
@@ -150,3 +152,14 @@ * `err` - First parameter to the callback detailing any errors. | ||
## A Note on Rounds | ||
A note about the cost. When you are hashing your data the module will go through a series of rounds to give you a secure hash. The value you submit there is not just the number of rounds that the module will go through to hash your data. The module will use the value you enter and go through `2^rounds` iterations of processing. | ||
From @garthk, on a 2GHz core you can roughly expect: | ||
rounds=10: ~10 hashes/sec | ||
rounds=13: ~1 sec/hash | ||
rounds=25: ~1 hour/hash | ||
rounds=31: 2-3 days/hash | ||
## Hash Info | ||
@@ -153,0 +166,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19
223
80607
2