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

Function randomNonce

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

Source from the content-addressed store, hash-verified

82};
83
84const randomNonce = (): string => {
85 const bytes = new Uint8Array(32);
86 crypto.getRandomValues(bytes);
87 return Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
88};
89
90const timingSafeEqual = (a: string, b: string): boolean => {
91 if (a.length !== b.length) return false;

Callers 1

handlers.tsFile · 0.85

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected