phase 2 and 3

This commit is contained in:
jason
2026-04-21 08:56:51 -05:00
parent b98837a72c
commit d79aaf6ef8
42 changed files with 4962 additions and 19 deletions
+14
View File
@@ -0,0 +1,14 @@
import { randomBytes } from "node:crypto";
/**
* Operation QR tokens are opaque, URL-safe, high-entropy identifiers
* printed on traveler cards. 24 bytes = 192 bits of entropy, encoded
* as base64url -> 32 characters.
*/
export function generateQrToken(): string {
return randomBytes(24)
.toString("base64")
.replace(/\+/g, "-")
.replace(/\//g, "_")
.replace(/=+$/, "");
}