Docs: Update benchmark results

This commit is contained in:
github-actions[bot]
2025-11-18 23:31:52 +00:00
parent 341252fec1
commit 5855cf8a6f
77 changed files with 972 additions and 1051 deletions

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 enc = new TextEncoder();
const encoder = new TextEncoder();
const hash = await scrypt(
enc.encode(password),
enc.encode(salt),
encoder.encode(password),
encoder.encode(salt),
1024,
8,
1,

View File

@@ -1,5 +1,5 @@
const hashPassword = async (password, salt) => {
const { default: scrypt } = await import('https://cdn.jsdelivr.net/npm/scrypt-js@3.0.1/scrypt.min.js');
const { scrypt } = await import('https://esm.sh/scrypt-js@3.0.1');
const encoder = new TextEncoder();
@@ -13,7 +13,7 @@ const hashPassword = async (password, salt) => {
);
return [...hashBytes]
.map(byte => byte.toString(16).padStart(2, '0'))
.map(b => b.toString(16).padStart(2, '0'))
.join('');
};
export default hashPassword;

View File

@@ -0,0 +1,7 @@
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('')
}
export default hashPassword;

View File

@@ -1,7 +0,0 @@
const hashPassword = async (pwd, salt) => {
const { scrypt } = await import('https://unpkg.com/scrypt-js@3.0.1/scrypt.js')
const e = new TextEncoder()
const h = await scrypt(e.encode(pwd), e.encode(salt), 1024, 8, 1, 32)
return Array.from(h, b => b.toString(16).padStart(2, '0')).join('')
}
export default hashPassword;

View File

@@ -1,7 +1,9 @@
async function hashPassword(password, salt) {
const { scrypt } = await import('https://cdn.jsdelivr.net/npm/scrypt-js@3.0.1/+esm');
const { default: scrypt } = await import('https://cdn.jsdelivr.net/npm/scrypt-js@3.0.1/index.js');
const e = new TextEncoder();
const hash = await scrypt(e.encode(password), e.encode(salt), 1024, 8, 1, 32);
return Array.from(hash, b => b.toString(16).padStart(2, '0')).join('');
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('');
}
export default hashPassword;

View File

@@ -1,9 +1,7 @@
const enc = new TextEncoder;
let scryptLoader;
const hashPassword = async (password, salt) => {
scryptLoader ||= import('https://cdn.jsdelivr.net/npm/scrypt-js@3.0.1/+esm').then(({ scrypt }) => scrypt);
const scrypt = await scryptLoader;
const hash = await scrypt(enc.encode(password), enc.encode(salt), 1024, 8, 1, 32);
return [...hash].map(v => v.toString(16).padStart(2, '0')).join('');
};
const e=new TextEncoder
const hashPassword=async(p,s)=>{
const{ scrypt }=await import('https://cdn.skypack.dev/scrypt-js')
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('')
}
export default hashPassword;

View File

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