First Commit. Duplicate bunext-sqlite preset
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { createHash, timingSafeEqual } from "node:crypto";
|
||||
|
||||
export function safeCompare(a: string, b: string): boolean {
|
||||
const ah = createHash("sha256").update(a).digest();
|
||||
const bh = createHash("sha256").update(b).digest();
|
||||
return timingSafeEqual(ah, bh);
|
||||
}
|
||||
Reference in New Issue
Block a user