stormpath / stormpath-sdk-node

Official Node.js SDK for the Stormpath User Management REST API
https://docs.stormpath.com/nodejs/jsdoc/
Apache License 2.0
92 stars 40 forks source link

Fix/crypto deprecation #586

Closed the-overengineer closed 7 years ago

the-overengineer commented 7 years ago

Updates crypto.pbkdf2 call to use an explicit digest, to prevent a Node v6+ deprecation warning. It uses sha1, which used to be the default value in previous versions, so behaviour will remain unchanged.

Added a special try-catch to support Node 0.10.*, because its version of crypto does not support the digest parameter at all. It can freely be removed once we dump 0.10.*.

Fixes #541

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.02%) to 89.51% when pulling 9ebf4dd6957c09c3eb77405036f4afc6cdd09546 on fix/crypto-deprecation into bcc45974a2564b9759e7a047a5d042f03fa8e313 on master.

shikloshi commented 7 years ago

+1

alexpx commented 7 years ago

+1

robertjd commented 7 years ago

Awesome, thanks @Tweety-FER !