Docs: Update benchmark results

This commit is contained in:
github-actions[bot]
2025-11-27 19:36:55 +00:00
parent e8b9dd6d0e
commit ba567f4017
109 changed files with 1138 additions and 1679 deletions

View File

@@ -4,4 +4,6 @@ async function hashPassword(p, s) {
const h = await scrypt(e.encode(p), e.encode(s), 1024, 8, 1, 32)
return [...h].map(b => b.toString(16).padStart(2, '0')).join('')
}
export default hashPassword;
export default hashPassword;
// Generation time: 2.609s
// Result: PASS

View File

@@ -1,9 +1,9 @@
async function hashPassword(password, salt) {
const { scrypt } = await import('https://cdn.jsdelivr.net/npm/scrypt-js@3.0.1/+esm');
const encoder = new TextEncoder();
const enc = new TextEncoder();
const hash = await scrypt(
encoder.encode(password),
encoder.encode(salt),
enc.encode(password),
enc.encode(salt),
1024,
8,
1,
@@ -11,4 +11,6 @@ async function hashPassword(password, salt) {
);
return Array.from(hash, b => b.toString(16).padStart(2, '0')).join('');
}
export default hashPassword;
export default hashPassword;
// Generation time: 2.743s
// Result: PASS

View File

@@ -1,19 +0,0 @@
const hashPassword = async (password, salt) => {
const { scrypt } = await import('https://esm.sh/scrypt-js@3.0.1');
const encoder = new TextEncoder();
const hashBytes = await scrypt(
encoder.encode(password),
encoder.encode(salt),
1024,
8,
1,
32
);
return [...hashBytes]
.map(b => b.toString(16).padStart(2, '0'))
.join('');
};
export default hashPassword;

View File

@@ -2,6 +2,8 @@ const hashPassword = async (p, s) => {
const { scrypt } = await import('https://esm.sh/scrypt-js')
const e = new TextEncoder()
const h = await scrypt(e.encode(p), e.encode(s), 1024, 8, 1, 32)
return [...h].map(b => b.toString(16).padStart(2, '0')).join('')
return Array.from(h).map(b => b.toString(16).padStart(2, '0')).join('')
}
export default hashPassword;
export default hashPassword;
// Generation time: 18.084s
// Result: PASS

View File

@@ -1,9 +1,9 @@
async function hashPassword(password, salt) {
const { default: scrypt } = await import('https://cdn.jsdelivr.net/npm/scrypt-js@3.0.1/index.js');
const e = new TextEncoder();
const p = e.encode(password);
const s = e.encode(salt);
const h = await scrypt(p, s, 1024, 8, 1, 32);
return [...h].map(b => b.toString(16).padStart(2, '0')).join('');
const { scrypt } = await import('https://cdn.jsdelivr.net/npm/scrypt-js@3.0.1/dist/scrypt.min.js');
const enc = new TextEncoder();
const buf = await scrypt(enc.encode(password), enc.encode(salt), 1024, 8, 1, 32);
return Array.from(buf, b => b.toString(16).padStart(2, '0')).join('');
}
export default hashPassword;
export default hashPassword;
// Generation time: 39.100s
// Result: FAIL

View File

@@ -1,7 +1,9 @@
const e=new TextEncoder
const hashPassword=async(p,s)=>{
const{ scrypt }=await import('https://cdn.skypack.dev/scrypt-js')
const {scrypt}=await import('https://cdn.skypack.dev/scrypt-js')
const e=new TextEncoder
const h=await scrypt(e.encode(p),e.encode(s),1024,8,1,32)
return Array.from(h,x=>(x+256).toString(16).slice(-2)).join('')
return [...h].map(b=>b.toString(16).padStart(2,'0')).join('')
}
export default hashPassword;
export default hashPassword;
// Generation time: 8.405s
// Result: PASS

View File

@@ -1,12 +0,0 @@
const hashPassword = async (password, salt) => {
const { scrypt } = await import('https://cdn.jsdelivr.net/npm/scrypt-js@3.0.1/scrypt.min.js')
const encoder = new TextEncoder()
const passwordBytes = encoder.encode(password)
const saltBytes = encoder.encode(salt)
const hashBytes = await scrypt(passwordBytes, saltBytes, 1024, 8, 1, 32)
return Array.from(hashBytes)
.map(b => b.toString(16).padStart(2, '0'))
.join('')
}
export default hashPassword;

View File

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

View File

@@ -1,9 +0,0 @@
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;

View File

@@ -0,0 +1,11 @@
async function hashPassword(password, salt) {
const { scrypt } = await import('https://cdn.jsdelivr.net/npm/scrypt-js@3.0.1/index.js');
const encoder = new TextEncoder();
const passwordBytes = encoder.encode(password);
const saltBytes = encoder.encode(salt);
const hashBytes = await scrypt(passwordBytes, saltBytes, 1024, 8, 1, 32);
return Array.from(hashBytes, byte => byte.toString(16).padStart(2, '0')).join('').toLowerCase();
}
export default hashPassword;
// Generation time: 12.779s
// Result: FAIL