juntekim.com/stripe_to_invoice/lib/auth/tokens.ts
2025-12-31 00:02:22 +00:00

10 lines
249 B
TypeScript

// lib/auth/tokens.ts
import crypto from "crypto";
export function generateToken() {
return crypto.randomBytes(32).toString("hex");
}
export function hashToken(token: string) {
return crypto.createHash("sha256").update(token).digest("hex");
}