MCPcopy Index your code
hub / github.com/promptfoo/promptfoo / fingerprintFetchCacheSecret

Function fingerprintFetchCacheSecret

src/cache.ts:307–316  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

305let nextAbortSignalId = 0;
306
307function fingerprintFetchCacheSecret(value: string) {
308 return {
309 __promptfooSecretFingerprint: crypto
310 .createHmac('sha256', FETCH_CACHE_SECRET_HMAC_SALT)
311 .update(FETCH_CACHE_SECRET_HMAC_CONTEXT)
312 .update('\0')
313 .update(value)
314 .digest('hex'),
315 };
316}
317
318function isSensitiveFetchCacheString(value: string, fieldName?: string) {
319 return (fieldName && isSecretField(fieldName)) || looksLikeSecret(value);

Callers 1

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…