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

Function randomNonce

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

Source from the content-addressed store, hash-verified

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

Callers 1

handlers.tsFile · 0.85

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected