Socket
Socket
Sign inDemoInstall

node-pbkdf2

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.1.1

test/testVersionSwitch.sh

7

index.js

@@ -11,2 +11,4 @@ var crypto = require('crypto');

function NodePbkdf2 (options) {
options = options || {};
this.iterations = options.iterations || 10000;

@@ -75,3 +77,3 @@ this.saltLength = options.saltLength || 12;

, derivedKeyLength: self.derivedKeyLength
, derivedKey: new Buffer(derivedKey).toString('base64') }));
, derivedKey: new Buffer(derivedKey, 'binary').toString('base64') }));
});

@@ -98,3 +100,3 @@ };

if (new Buffer(derivedKey).toString('base64') === encryptedPassword.derivedKey) {
if (new Buffer(derivedKey, 'binary').toString('base64') === encryptedPassword.derivedKey) {
return callback(null, true);

@@ -108,3 +110,4 @@ } else {

// Interface
module.exports = NodePbkdf2;
{
"name": "node-pbkdf2",
"version": "0.1.0",
"version": "0.1.1",
"author": {

@@ -5,0 +5,0 @@ "name": "Louis Chatriot",

@@ -6,3 +6,4 @@ node-pbkdf2

It abstracts the API change between Node v0.8 and v0.10, you can begin using this module with one of the versions and it will also work on the other.
It abstracts the API change between Node v0.8 and v0.10, you can begin
using this module with any version and it will also work on the others.

@@ -18,2 +19,6 @@ It is future-proof, meaning that you can change the parameters to arbitrarily increase the strength of new password encryption and it will still be able to check against passwords encrypted with the old method.

// You can also test it works across the API change between Node v0.8 and v0.10
// You need to have nvm, node v0.8 and node v0.10 for this test
make testVersionSwitch
// Create a new password hasher with standard strength parameters

@@ -20,0 +25,0 @@ var NodePbkdf2 = require('node-pbkdf2')

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc