reduce extreme time consumption of pbkdf
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-04-04 22:09:25 +02:00
parent 78a535087a
commit 5bbf9d658c
3 changed files with 3 additions and 3 deletions

View File

@ -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');
}