MCPcopy Create free account
hub / github.com/Noumena-Network/code / shortHash

Function shortHash

src/utils/telemetry/betaSessionTracing.ts:123–125  ·  view source on GitHub ↗

* Generate a short hash (first 12 hex chars of SHA-256).

(content: string)

Source from the content-addressed store, hash-verified

121 * Generate a short hash (first 12 hex chars of SHA-256).
122 */
123function shortHash(content: string): string {
124 return createHash('sha256').update(content).digest('hex').slice(0, 12)
125}
126
127/**
128 * Generate a hash for a system prompt.

Callers 3

hashSystemPromptFunction · 0.85
hashMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected