MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / hashText

Function hashText

internal/cache/signature_cache.go:61–64  ·  view source on GitHub ↗

hashText creates a stable, Unicode-safe key from text content

(text string)

Source from the content-addressed store, hash-verified

59
60// hashText creates a stable, Unicode-safe key from text content
61func hashText(text string) string {
62 h := sha256.Sum256([]byte(text))
63 return hex.EncodeToString(h[:])[:SignatureTextHashLen]
64}
65
66// getOrCreateGroupCache gets or creates a cache bucket for a model group
67func getOrCreateGroupCache(groupKey string) *groupCache {

Callers 3

CacheSignatureBestEffortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected