Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
118
func
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
getDriverAppName
Function · 0.92
TestGetStringHash
Function · 0.85
Calls
1
Write
Method · 0.80
Tested by
1
TestGetStringHash
Function · 0.68