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

Function TestSimpleEncrypt

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

Source from the content-addressed store, hash-verified

11)
12
13func TestSimpleEncrypt(t *testing.T) {
14 var a = assert.NewAssertion(t)
15
16 var arr = []string{"Hello", "World", "People"}
17 for _, s := range arr {
18 var value = []byte(s)
19 var encoded = utils.SimpleEncrypt(value)
20 t.Log(encoded, string(encoded))
21 var decoded = utils.SimpleDecrypt(encoded)
22 t.Log(decoded, string(decoded))
23 a.IsTrue(s == string(decoded))
24 }
25}
26
27func TestSimpleEncryptObject(t *testing.T) {
28 var a = assert.NewAssertion(t)

Callers

nothing calls this directly

Calls 3

SimpleEncryptFunction · 0.92
SimpleDecryptFunction · 0.92
LogMethod · 0.80

Tested by

no test coverage detected