chore: remove unused crypto util

This commit is contained in:
Elias Schneider
2025-06-17 17:55:52 +02:00
parent bef77ac8dc
commit d5928f6fea
3 changed files with 5505 additions and 5520 deletions

11017
frontend/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -17,7 +17,6 @@
"@tailwindcss/vite": "^4.1.7",
"axios": "^1.8.2",
"clsx": "^2.1.1",
"crypto": "^1.0.1",
"jose": "^5.9.6",
"qrcode": "^1.5.4",
"sveltekit-superforms": "^2.23.1",

View File

@@ -1,7 +0,0 @@
export async function createSHA256hash(input: string) {
const msgUint8 = new TextEncoder().encode(input); // encode as (utf-8) Uint8Array
const hashBuffer = await crypto.subtle.digest('SHA-256', msgUint8); // hash the message
const hashArray = Array.from(new Uint8Array(hashBuffer)); // convert buffer to byte array
const hashHex = hashArray.map((b) => b.toString(16).padStart(2, '0')).join(''); // convert bytes to hex string
return hashHex;
}