MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / deriveApiKeyDiscriminator

Function deriveApiKeyDiscriminator

src/api/providers/fetchers/modelCache.ts:116–118  ·  view source on GitHub ↗

* Derive a short, irreversible, non-identifying cache-key discriminator from an API key.

(apiKey: string)

Source from the content-addressed store, hash-verified

114 * Derive a short, irreversible, non-identifying cache-key discriminator from an API key.
115 */
116function deriveApiKeyDiscriminator(apiKey: string): string {
117 return deriveCacheDigest(apiKey, API_KEY_DISCRIMINATOR_BYTES)
118}
119
120/**
121 * Build a cache key that is unique per provider+server+key combination.

Callers 1

getCacheKeyFunction · 0.85

Calls 1

deriveCacheDigestFunction · 0.85

Tested by

no test coverage detected