MCPcopy Create free account
hub / github.com/callstack/agent-device / timingSafeStringEqual

Function timingSafeStringEqual

src/utils/timing-safe-equal.ts:8–12  ·  view source on GitHub ↗
(a: string, b: string)

Source from the content-addressed store, hash-verified

6 * throw nor leak length via timing.
7 */
8export function timingSafeStringEqual(a: string, b: string): boolean {
9 const hashA = crypto.createHash('sha256').update(a).digest();
10 const hashB = crypto.createHash('sha256').update(b).digest();
11 return crypto.timingSafeEqual(hashA, hashB);
12}

Callers 4

isAuthorizedFunction · 0.90
runRequestWithinScopeFunction · 0.90
enforceDaemonTokenFunction · 0.90

Calls 1

updateMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…