question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning in crypto.pbkdf2 with NodeJS 6.

See original GitHub issue

I recently upgraded to NodeJS 6.1.0, npm 3.8.6. Now Superlogin APIs result in this deprecation warning -

(node:11324) DeprecationWarning: crypto.pbkdf2 without specifying a digest is deprecated. Please specify a digest

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

15reactions
palejabhargavcommented, Aug 28, 2017

You can add following dependency in your package.json for npm to fetch dependency directly from github repo which already has the fix. "couch-pwd": "zemirco/couch-pwd"

6reactions
sandro-pasqualicommented, Jun 1, 2017

This now breaks in Node 8. Superlogin throws now – no longer just deprecated. It is a straight failure now.

TypeError: The "digest" argument is required and must not be undefined
    at pbkdf2 (crypto.js:635:11)
    at Object.exports.pbkdf2 (crypto.js:623:10)
    at Object.exports.hash (/.../node_modules/couch-pwd/index.js:41:12)
    at Object.exports.verifyPassword (/.../node_modules/superlogin/lib/util.js:37:10)
    at /.../node_modules/superlogin/lib/local.js:55:18
    at <anonymous>

Can we get this updated? Also, the npm module version hasn’t been updated in quite a while and it would be good to get some recent fixes in a distributable package form.

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

NodeJS 6 crypto complaining about digest in deprecation ...
The current published version doesn't pass an argument for the digest, which is causing the warning message to be produced.
Read more >
Symmetric Key Encryption With PBKDF2 (and Node.js) - Medium
Notice that the encryption key is twice the size for the 256-bit version as apposed to the 128-bit key size. Cryptography · Cybersecurity...
Read more >
Crypto | Node.js v19.3.0 Documentation
A bit field containing any warnings and/or errors resulting from a check performed during initialization of the DiffieHellman object. The following values are ......
Read more >
Node.js crypto.pbkdf2() Method - GeeksforGeeks
The crypto.pbkdf2() method gives an asynchronous Password-Based Key Derivation Function 2 i.e. (PBKDF2) implementation. Moreover, a particular ...
Read more >
Hash and check passwords in node.js using the native pbkdf2
randomBytes(config.saltBytes, (err, salt) =>{ if (err){return rejeted('Error while sign in');} salt = salt.toString('hex'); crypto.pbkdf2( ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found