Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

chore: remove unnecessary function

Rudy B.df913fd77fe3
diff --git a/src/lib/two-factor/crypto.ts b/src/lib/two-factor/crypto.ts
index 009109e77..cc0cca056 100644
--- a/src/lib/two-factor/crypto.ts
+++ b/src/lib/two-factor/crypto.ts
@@ -1,4 +1,4 @@
-import { createCipheriv, createDecipheriv, randomBytes, timingSafeEqual } from 'crypto';
+import { createCipheriv, createDecipheriv, randomBytes } from 'crypto';
const ALGORITHM = 'aes-256-gcm';
@@ -31,9 +31,3 @@ export function decryptSecret(stored: string): string {
]);
return decrypted.toString('utf8');
}
-
-/** Compares two strings in constant time to prevent timing attacks. */
-export function constantTimeEqual(a: string, b: string): boolean {
- if (a.length !== b.length) return false;
- return timingSafeEqual(Buffer.from(a), Buffer.from(b));
-}