mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-03-17 11:21:00 +00:00
Docs: Update benchmark for openai/gpt-5.3-codex
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
|
||||
async function hashPassword(password, salt) {
|
||||
if (typeof password !== 'string' || typeof salt !== 'string') throw new TypeError('password and salt must be strings')
|
||||
const { scrypt: named, default: def } = await import('https://cdn.jsdelivr.net/npm/scrypt-js@3.0.1/+esm')
|
||||
const scrypt = named || def?.scrypt || def
|
||||
if (typeof scrypt !== 'function') throw new Error('Failed to load scrypt function')
|
||||
const enc = new TextEncoder()
|
||||
const hash = await scrypt(enc.encode(password), enc.encode(salt), 1024, 8, 1, 32)
|
||||
return Array.from(hash, b => b.toString(16).padStart(2, '0')).join('')
|
||||
}
|
||||
export default hashPassword;
|
||||
// Generation time: 0.499s
|
||||
// Result: FAIL
|
||||
// Generation time: 7.962s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user