MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / SimpleDecryptMap

Function SimpleDecryptMap

internal/utils/encrypt.go:100–112  ·  view source on GitHub ↗
(base64String string)

Source from the content-addressed store, hash-verified

98}
99
100func SimpleDecryptMap(base64String string) (maps.Map, error) {
101 data, err := base64.StdEncoding.DecodeString(base64String)
102 if err != nil {
103 return nil, err
104 }
105 var mJSON = SimpleDecrypt(data)
106 var result = maps.Map{}
107 err = json.Unmarshal(mJSON, &result)
108 if err != nil {
109 return nil, err
110 }
111 return result, nil
112}
113
114func SimpleEncryptObject(ptr any) (string, error) {
115 mJSON, err := json.Marshal(ptr)

Callers 3

TestSimpleEncryptMapFunction · 0.92
PerformMethod · 0.92
RunMethod · 0.92

Calls 1

SimpleDecryptFunction · 0.85

Tested by 1

TestSimpleEncryptMapFunction · 0.74