MCPcopy
hub / github.com/PatchMon/PatchMon / hashString

Function hashString

agent-source-code/internal/utils/offset.go:39–43  ·  view source on GitHub ↗

hashString creates a deterministic hash from a string using FNV-1a algorithm This ensures the same input always produces the same hash value

(s string)

Source from the content-addressed store, hash-verified

37// hashString creates a deterministic hash from a string using FNV-1a algorithm
38// This ensures the same input always produces the same hash value
39func hashString(s string) uint64 {
40 h := fnv.New64a()
41 h.Write([]byte(s))
42 return h.Sum64()
43}

Callers 1

CalculateReportOffsetFunction · 0.70

Calls 1

WriteMethod · 0.80

Tested by

no test coverage detected