github.com/imannamdari/v2ray-core/v5@v5.0.5/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  }