MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / randomNonce

Function randomNonce

apps/cloud/src/auth/handlers.ts:76–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74};
75
76const randomNonce = (): string => {
77 const bytes = new Uint8Array(32);
78 crypto.getRandomValues(bytes);
79 return Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
80};
81
82const timingSafeEqual = (a: string, b: string): boolean => {
83 if (a.length !== b.length) return false;

Callers 1

handlers.tsFile · 0.85

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected