MCPcopy Index your code
hub / github.com/windtf/wireproxy / encodeBase64ToHex

Function encodeBase64ToHex

config.go:141–150  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

139}
140
141func encodeBase64ToHex(key string) (string, error) {
142 decoded, err := base64.StdEncoding.DecodeString(key)
143 if err != nil {
144 return "", errors.New("invalid base64 string: " + key)
145 }
146 if len(decoded) != 32 {
147 return "", errors.New("key should be 32 bytes: " + key)
148 }
149 return hex.EncodeToString(decoded), nil
150}
151
152func parseNetIP(section *ini.Section, keyName string) ([]netip.Addr, error) {
153 key, err := parseString(section, keyName)

Callers 2

parseBase64KeyToHexFunction · 0.85
ParsePeersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected