MCPcopy Create free account
hub / github.com/NVIDIA/gpu-operator / GetStringHash

Function GetStringHash

internal/utils/utils.go:118–124  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

116}
117
118func GetStringHash(s string) string {
119 hasher := fnv.New32a()
120 if _, err := hasher.Write([]byte(s)); err != nil {
121 panic(err)
122 }
123 return rand.SafeEncodeString(fmt.Sprint(hasher.Sum32()))
124}

Callers 2

getDriverAppNameFunction · 0.92
TestGetStringHashFunction · 0.85

Calls 1

WriteMethod · 0.80

Tested by 1

TestGetStringHashFunction · 0.68