MCPcopy
hub / github.com/garrytan/gstack / hashPayload

Function hashPayload

browse/src/security.ts:362–365  ·  view source on GitHub ↗
(payload: string)

Source from the content-addressed store, hash-verified

360}
361
362export function hashPayload(payload: string): string {
363 const salt = getDeviceSalt();
364 return createHash('sha256').update(salt).update(payload).digest('hex');
365}
366
367/**
368 * Rotate attempts.jsonl when it exceeds 10MB. Keeps 5 generations.

Callers 1

security.test.tsFile · 0.90

Calls 1

getDeviceSaltFunction · 0.85

Tested by

no test coverage detected