Add level scores
This commit is contained in:
8 files changed
+242
-39
No files matched your search
@@ -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('')
|
||||
}
|
||||
Reference in new issue
Block a user