MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / sign

Function sign

telemetry-dashboard/src/auth.ts:67–70  ·  view source on GitHub ↗
(secret: string, payload: string)

Source from the content-addressed store, hash-verified

65}
66
67async function sign(secret: string, payload: string): Promise<Uint8Array> {
68 const signature = await crypto.subtle.sign('HMAC', await hmacKey(secret), encoder.encode(payload));
69 return new Uint8Array(signature);
70}
71
72/**
73 * Constant-time string equality. Both sides are hashed first so the digests are

Callers 2

issueSessionFunction · 0.85
hasValidSessionFunction · 0.85

Calls 1

hmacKeyFunction · 0.85

Tested by

no test coverage detected