Add level scores

This commit is contained in:
Lncvrt committed 2026-02-20 10:16:59 -07:00
1 parent debd8439ef
commit a270e77236
8 files changed
+242 -39

No files matched your search

+8
View File
@@ -13,3 +13,11 @@ export const splitGd = (input: string): Record<string, string> => {
}
return result
}
export const encodeGJP2 = async (password = '', salt = 'mI29fmAnxgTs') => {
const data = new TextEncoder().encode(password + salt)
const hashBuffer = await crypto.subtle.digest('SHA-1', data)
return Array.from(new Uint8Array(hashBuffer))
.map(b => b.toString(16).padStart(2, '0'))
.join('')
}