mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 00:27:55 +00:00
Docs: Update benchmark for minimax/minimax-m2
This commit is contained in:
18
tests/10_scrypt_hash/outputs/minimax_minimax-m2.js
Normal file
18
tests/10_scrypt_hash/outputs/minimax_minimax-m2.js
Normal file
@@ -0,0 +1,18 @@
|
||||
let _scrypt;
|
||||
|
||||
export async function hashPassword(password, salt) {
|
||||
if (!_scrypt) {
|
||||
const mod = await import('https://cdn.skypack.dev/scrypt-js');
|
||||
_scrypt = mod.default || mod.scrypt;
|
||||
}
|
||||
const hash = await _scrypt(new TextEncoder().encode(password), new TextEncoder().encode(salt), {
|
||||
N: 1024,
|
||||
r: 8,
|
||||
p: 1,
|
||||
dkLen: 32
|
||||
});
|
||||
return [...hash].map(b => b.toString(16).padStart(2, '0')).join('');
|
||||
}
|
||||
export default hashPassword;
|
||||
// Generation time: 17.866s
|
||||
// Result: FAIL
|
||||
Reference in New Issue
Block a user