first commit
Some checks failed
Publish / Publish Job (push) Failing after 37s

This commit is contained in:
Дмитрий
2026-03-27 10:38:23 +03:00
commit be1e21e699
21 changed files with 1002 additions and 0 deletions

10
lib/utils/crypto.ts Normal file
View File

@@ -0,0 +1,10 @@
import { timingSafeEqual } from 'crypto'
export function constantTimeEqual(a: string, b: string) {
const bufA = Buffer.from(a)
const bufB = Buffer.from(b)
if (bufA.length !== bufB.length) return false
return timingSafeEqual(bufA, bufB)
}