MCPcopy
hub / github.com/CodebuffAI/codebuff / hashClientIp

Function hashClientIp

web/src/server/free-mode-country.ts:242–248  ·  view source on GitHub ↗
(
  clientIp: string | undefined,
  secret: string | undefined,
)

Source from the content-addressed store, hash-verified

240}
241
242export function hashClientIp(
243 clientIp: string | undefined,
244 secret: string | undefined,
245): string | null {
246 if (!clientIp || !secret) return null
247 return createHmac('sha256', secret).update(clientIp).digest('hex')
248}
249
250function setIpinfoPrivacyCache(
251 ip: string,

Calls

no outgoing calls

Tested by

no test coverage detected