github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/common/platform/securedload/verify.go (about) 1 package securedload 2 3 type ProtectedLoader interface { 4 VerifyAndLoad(filename string) ([]byte, error) 5 } 6 7 var knownProtectedLoader map[string]ProtectedLoader 8 9 func RegisterProtectedLoader(name string, sv ProtectedLoader) { 10 if knownProtectedLoader == nil { 11 knownProtectedLoader = map[string]ProtectedLoader{} 12 } 13 knownProtectedLoader[name] = sv 14 }