mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 00:27:55 +00:00
Docs: Update benchmark for x-ai/grok-4.1-fast
This commit is contained in:
9
tests/10_scrypt_hash/outputs/x-ai_grok-4.1-fast.js
Normal file
9
tests/10_scrypt_hash/outputs/x-ai_grok-4.1-fast.js
Normal file
@@ -0,0 +1,9 @@
|
||||
async function hashPassword(password, salt) {
|
||||
const { scrypt } = await import('https://cdn.skypack.dev/scrypt-js');
|
||||
const encoder = new TextEncoder();
|
||||
const pwBuf = encoder.encode(password);
|
||||
const saltBuf = encoder.encode(salt);
|
||||
const hashBuf = await scrypt(pwBuf, saltBuf, 1024, 8, 1, 32);
|
||||
return Array.from(hashBuf).map(b => b.toString(16).padStart(2, '0')).join('');
|
||||
}
|
||||
export default hashPassword;
|
||||
Reference in New Issue
Block a user