mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 06:34:41 +02:00
Fix Node.js 10 deprecation warnings
This commit is contained in:
parent
476e8f2f0c
commit
f16eb6f3e6
12 changed files with 42 additions and 41 deletions
|
@ -130,8 +130,8 @@ module.exports = class User {
|
|||
//
|
||||
// Use constant time comparison here for security feel-goods
|
||||
//
|
||||
const passDkBuf = new Buffer(passDk, 'hex');
|
||||
const propsDkBuf = new Buffer(propsDk, 'hex');
|
||||
const passDkBuf = Buffer.from(passDk, 'hex');
|
||||
const propsDkBuf = Buffer.from(propsDk, 'hex');
|
||||
|
||||
if(passDkBuf.length !== propsDkBuf.length) {
|
||||
return callback(Errors.AccessDenied('Invalid password'));
|
||||
|
@ -595,7 +595,7 @@ module.exports = class User {
|
|||
}
|
||||
|
||||
static generatePasswordDerivedKey(password, salt, cb) {
|
||||
password = new Buffer(password).toString('hex');
|
||||
password = Buffer.from(password).toString('hex');
|
||||
|
||||
crypto.pbkdf2(password, salt, User.PBKDF2.iterations, User.PBKDF2.keyLen, 'sha1', (err, dk) => {
|
||||
if(err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue