MCPcopy Create free account
hub / github.com/aetherstate/GODMOD3.AI / hashKey

Function hashKey

api/middleware/auth.ts:43–45  ·  view source on GitHub ↗

Hash a key for safe use as a rate-limit bucket identifier.

(key: string)

Source from the content-addressed store, hash-verified

41
42/** Hash a key for safe use as a rate-limit bucket identifier. */
43function hashKey(key: string): string {
44 return createHash('sha256').update(key).digest('hex').slice(0, 16)
45}
46
47// H-1: Warn at startup if auth is disabled
48if (!getValidKeys()) {

Callers 1

apiKeyAuthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected