internal/crypto/pbkdf2.js:56
throw new ERR_INVALID_ARG_TYPE('digest', ['string', 'null'], digest);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "digest" argument must be one of type string or null. Received type undefined
at check (internal/crypto/pbkdf2.js:56:13)
at Object.pbkdf2 (internal/crypto/pbkdf2.js:25:7)
at encrypt (/home/ubuntu/paypal-retail-node-master/index.js:243:12)
at /home/ubuntu/paypal-retail-node-master/index.js:191:1
at /home/ubuntu/paypal-retail-node-master/node_modules/wreck/lib/index.js:454:20
at finish (/home/ubuntu/paypal-retail-node-master/node_modules/wreck/lib/index.js:296:20)
at wrapped (/home/ubuntu/paypal-retail-node-master/node_modules/hoek/lib/index.js:866:20)
at module.exports.internals.Recorder.onReaderFinish (/home/ubuntu/paypal-retail-node-master/node_modules/wreck/lib/index.js:346:16)
at Object.onceWrapper (events.js:273:13)
at module.exports.internals.Recorder.emit (events.js:187:15)
I am getting below error while generating token.
internal/crypto/pbkdf2.js:56 throw new ERR_INVALID_ARG_TYPE('digest', ['string', 'null'], digest); ^
TypeError [ERR_INVALID_ARG_TYPE]: The "digest" argument must be one of type string or null. Received type undefined at check (internal/crypto/pbkdf2.js:56:13) at Object.pbkdf2 (internal/crypto/pbkdf2.js:25:7) at encrypt (/home/ubuntu/paypal-retail-node-master/index.js:243:12) at /home/ubuntu/paypal-retail-node-master/index.js:191:1 at /home/ubuntu/paypal-retail-node-master/node_modules/wreck/lib/index.js:454:20 at finish (/home/ubuntu/paypal-retail-node-master/node_modules/wreck/lib/index.js:296:20) at wrapped (/home/ubuntu/paypal-retail-node-master/node_modules/hoek/lib/index.js:866:20) at module.exports.internals.Recorder.onReaderFinish (/home/ubuntu/paypal-retail-node-master/node_modules/wreck/lib/index.js:346:16) at Object.onceWrapper (events.js:273:13) at module.exports.internals.Recorder.emit (events.js:187:15)