mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-22 15:31:07 +00:00
10 lines
240 B
TypeScript
10 lines
240 B
TypeScript
import { randomBytes, randomUUID } from "node:crypto";
|
|
|
|
export function generateSecureUuid(): string {
|
|
return randomUUID();
|
|
}
|
|
|
|
export function generateSecureToken(bytes = 16): string {
|
|
return randomBytes(bytes).toString("base64url");
|
|
}
|