Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.3.2 to 0.4.0

1

examples/async_compare.js

@@ -10,2 +10,3 @@ var bcrypt = require('../bcrypt');

console.log('crypted cb end: ' + (Date.now() - start) + 'ms');
console.log('rounds used from hash:', bcrypt.get_rounds(crypted));
bcrypt.compare('test', crypted, function(err, res) {

@@ -12,0 +13,0 @@ console.log('compared true: ' + res);

2

package.json

@@ -6,3 +6,3 @@ {

"main": "./bcrypt",
"version": "0.3.2",
"version": "0.4.0",
"author": "Nick Campbell (http://github.com/ncb000gt)",

@@ -9,0 +9,0 @@ "engines": { "node": ">= 0.4.0" },

@@ -110,3 +110,6 @@ node.bcrypt.js

* `same` - Second parameter to the callback providing whether the data and encrypted forms match [true | false].
* `get_rounds(encrypted)` - return the number of rounds used to encrypt a given hash
* `encrypted` - [REQUIRED] - hash from which the number of rounds used should be extracted.
Hash Info

@@ -113,0 +116,0 @@ ============

@@ -11,3 +11,3 @@ var testCase = require('nodeunit').testCase,

test_salt_no_params: function(assert) {
assert.throws(function() {bcrypt.gen_salt_sync();}, "Should throw an Error. gen_salt requires # of rounds.");
assert.throws(function() {bcrypt.gen_salt_sync();}, "Should not throw an Error. .");
assert.done();

@@ -75,3 +75,8 @@ },

assert.done();
},
test_get_rounds: function(assert) {
var hash = bcrypt.encrypt_sync("test", bcrypt.gen_salt_sync(9));
assert.equals(9, bcrypt.get_rounds(hash), "get_rounds can't extract rounds");
assert.done();
}
});

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