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

Function TestSimpleEncryptMap

internal/utils/encrypt_test.go:63–80  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

61}
62
63func TestSimpleEncryptMap(t *testing.T) {
64 var m = maps.Map{
65 "s": "Hello",
66 "i": 20,
67 "b": true,
68 }
69 encodedResult, err := utils.SimpleEncryptMap(m)
70 if err != nil {
71 t.Fatal(err)
72 }
73 t.Log("result:", encodedResult)
74
75 decodedResult, err := utils.SimpleDecryptMap(encodedResult)
76 if err != nil {
77 t.Fatal(err)
78 }
79 t.Log(decodedResult)
80}

Callers

nothing calls this directly

Calls 3

SimpleEncryptMapFunction · 0.92
SimpleDecryptMapFunction · 0.92
LogMethod · 0.80

Tested by

no test coverage detected