Honestly way too much went into this single commit. I am so sorry future me

This commit is contained in:
Emma
2023-06-09 00:54:00 -06:00
parent cd3f653f3f
commit 42c0004150
67 changed files with 4617 additions and 92 deletions

View File

@@ -4,7 +4,7 @@ let key: CryptoKey;
try {
const storedKey = Deno.readTextFileSync('./key.txt');
key = await crypto.subtle.importKey('jwk', JSON.parse(storedKey), {name: 'HMAC', hash: 'SHA-512'}, true, ['sign', 'verify']);
} catch (error) {
} catch (_) {
key = await crypto.subtle.generateKey(
{ name: "HMAC", hash: {name: 'SHA-512'} },
true,