chore: remove unnecessary function

This commit is contained in:
Rudy B. committed 2026-04-25 16:13:21 +02:00
1 parent 1068a82d03
commit df913fd77f
1 file changed
+1 -7
+1 -7
View File
@@ -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));
}