From 4dba24a6885ac6e7e1a449e210f43196c3dd1bc6 Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Mon, 27 Jan 2025 09:03:44 -0500 Subject: [PATCH] unused --- src/lib/server/crypto/encryption.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/lib/server/crypto/encryption.ts b/src/lib/server/crypto/encryption.ts index 1872f59..3e077db 100644 --- a/src/lib/server/crypto/encryption.ts +++ b/src/lib/server/crypto/encryption.ts @@ -21,7 +21,6 @@ export function encrypt(value: string): string { const key = scryptSync(password, salt, 32); const iv = randomBytes(8); - // @ts-expect-error Bun typing mismatch, but it still works! const cipher = createCipheriv(algorithm, key, iv); const encrypted = cipher.update(value, 'utf-8', 'hex') + cipher.final('hex'); const authTag = cipher.getAuthTag(); @@ -33,9 +32,7 @@ export function decrypt(value: string): string { const key = scryptSync(password, salt, 32); const [iv, text, authTag] = deconstruct(value, iv_position); - // @ts-expect-error Bun typing mismatch, but it still works! const decipher = createDecipheriv(algorithm, key, iv); - // @ts-expect-error Bun typing mismatch, but it still works! decipher.setAuthTag(authTag); return decipher.update(text, 'hex', 'utf-8') + decipher.final('utf-8');