chore: remove unnecessary function
This commit is contained in:
1 parent
1068a82d03
commit
df913fd77f
1 file changed
+1
-7
@@ -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));
|
||||
}
|
||||
Reference in new issue
Block a user