reduce extreme time consumption of pbkdf
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -12,7 +12,7 @@ const { scrypt } = require ('scrypt-js');
|
||||
async function pbkdf_scrypt (str, salt) {
|
||||
const bstr = Buffer.from (str.normalize ('NFKC'), 'utf-8');
|
||||
const bsalt = Buffer.from (salt.normalize ('NFKC'), 'utf-8');
|
||||
const hash = await scrypt (bstr, bsalt, 65536, 8, 1, 64);
|
||||
const hash = await scrypt (bstr, bsalt, 8192, 8, 1, 64);
|
||||
return Buffer.from (hash)
|
||||
.toString ('hex');
|
||||
}
|
||||
|
Reference in New Issue
Block a user