1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 18:17:52 -05:00
v2fly/common/platform/securedload/file.go

14 lines
320 B
Go
Raw Normal View History

2021-03-16 18:05:01 -04:00
package securedload
func GetAssetSecured(name string) ([]byte, error) {
var err error
for k, v := range knownProtectedLoader {
2021-03-27 21:33:00 -04:00
loadedData, errLoad := v.VerifyAndLoad(name)
if errLoad == nil {
2021-03-16 18:05:01 -04:00
return loadedData, nil
}
2021-03-27 21:33:00 -04:00
err = newError(k, " is not loading executable file").Base(errLoad)
2021-03-16 18:05:01 -04:00
}
return nil, err
}