using @mlink/scrypt for node 10 compatibility

This commit is contained in:
azivner
2018-09-05 15:14:20 +02:00
parent bc669c7b81
commit 46f37f7426
3 changed files with 25 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
"use strict";
const optionService = require('./options');
const scrypt = require('scrypt');
const scrypt = require('@mlink/scrypt');
async function getVerificationHash(password) {
const salt = await optionService.getOption('passwordVerificationSalt');
@@ -17,7 +17,7 @@ async function getPasswordDerivedKey(password) {
async function getScryptHash(password, salt) {
const hashed = scrypt.hashSync(password,
{N: 16384, r:8, p:1},
{N: 14, r:8, p:1},
32,
salt);