| 2985 | } |
| 2986 | |
| 2987 | TSReturnCode |
| 2988 | TSCacheKeyDigestSet(TSCacheKey key, const char *input, int length) |
| 2989 | { |
| 2990 | sdk_assert(sdk_sanity_check_cachekey(key) == TS_SUCCESS); |
| 2991 | sdk_assert(sdk_sanity_check_iocore_structure((void *)input) == TS_SUCCESS); |
| 2992 | sdk_assert(length > 0); |
| 2993 | CacheInfo *ci = reinterpret_cast<CacheInfo *>(key); |
| 2994 | |
| 2995 | if (ci->magic != CACHE_INFO_MAGIC_ALIVE) { |
| 2996 | return TS_ERROR; |
| 2997 | } |
| 2998 | |
| 2999 | CryptoContext().hash_immediate(ci->cache_key, input, length); |
| 3000 | return TS_SUCCESS; |
| 3001 | } |
| 3002 | |
| 3003 | TSReturnCode |
| 3004 | TSCacheKeyDigestFromUrlSet(TSCacheKey key, TSMLoc url) |