Files
lynchmark/tests/10_scrypt_hash/outputs/minimax_minimax-m2.5.js
2026-02-12 16:36:02 +00:00

10 lines
380 B
JavaScript

async function hashPassword(pwd,salt){
const{scrypt}=await import('https://cdn.skypack.dev/scrypt-js');
const pw=new TextEncoder().encode(pwd);
const st=new TextEncoder().encode(salt);
const h=await scrypt(pw,st,1024,8,1,32);
return Array.from(h).map(b=>b.toString(16).padStart(2,'0')).join('');
}
export default hashPassword;
// Generation time: 30.558s
// Result: PASS