Files
lynchmark.com/tests/10_scrypt_hash/outputs_gemini/gemini-3-pro-preview TEMP_1.9.js
T

7 lines
300 B
JavaScript

const hashPassword = async (p, s) => {
const { scrypt: k } = await import('https://esm.sh/scrypt-js@3.0.1')
const e = t => new TextEncoder().encode(t)
const r = await k(e(p), e(s), 1024, 8, 1, 32)
return [...r].map(b => b.toString(16).padStart(2, '0')).join('')
}
export default hashPassword;