( clientIp: string | undefined, secret: string | undefined, )
| 240 | } |
| 241 | |
| 242 | export 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 | |
| 250 | function setIpinfoPrivacyCache( |
| 251 | ip: string, |
no outgoing calls
no test coverage detected