2017-05-03 15:35:00 +02:00
|
|
|
var crypto = require('crypto')
|
2017-05-24 15:10:37 +02:00
|
|
|
/* istanbul ignore next */
|
2017-12-10 21:51:33 +01:00
|
|
|
if (crypto && (!crypto.pbkdf2Sync || crypto.pbkdf2Sync.toString().indexOf('keylen, digest') === -1)) {
|
2017-08-14 05:01:11 +02:00
|
|
|
exports.pbkdf2 = require('./lib/async')
|
|
|
|
exports.pbkdf2Sync = require('./lib/sync')
|
|
|
|
} else {
|
|
|
|
exports.pbkdf2Sync = crypto.pbkdf2Sync
|
|
|
|
exports.pbkdf2 = crypto.pbkdf2
|
2017-05-03 15:35:00 +02:00
|
|
|
}
|