sync of options

This commit is contained in:
azivner
2017-11-02 20:48:02 -04:00
parent 40e27cd6f7
commit c3d776ae13
16 changed files with 142 additions and 59 deletions

View File

@@ -1,16 +1,16 @@
"use strict";
const sql = require('./sql');
const options = require('./options');
const scrypt = require('scrypt');
async function getVerificationHash(password) {
const salt = await sql.getOption('password_verification_salt');
const salt = await options.getOption('password_verification_salt');
return getScryptHash(password, salt);
}
async function getPasswordDerivedKey(password) {
const salt = await sql.getOption('password_derived_key_salt');
const salt = await options.getOption('password_derived_key_salt');
return getScryptHash(password, salt);
}