代码拉取完成,页面将自动刷新
var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs
function checkBuffer (buf, name) {
if (typeof buf !== 'string' && !Buffer.isBuffer(buf)) {
throw new TypeError(name + ' must be a buffer or string')
}
}
module.exports = function (password, salt, iterations, keylen) {
checkBuffer(password, 'Password')
checkBuffer(salt, 'Salt')
if (typeof iterations !== 'number') {
throw new TypeError('Iterations not a number')
}
if (iterations < 0) {
throw new TypeError('Bad iterations')
}
if (typeof keylen !== 'number') {
throw new TypeError('Key length not a number')
}
if (keylen < 0 || keylen > MAX_ALLOC || keylen !== keylen) { /* eslint no-self-compare: 0 */
throw new TypeError('Bad key length')
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。