MCPcopy Index your code
hub / github.com/GoEdgeLab/EdgeNode / TestSimpleEncrypt_Concurrent

Function TestSimpleEncrypt_Concurrent

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

Source from the content-addressed store, hash-verified

48}
49
50func TestSimpleEncrypt_Concurrent(t *testing.T) {
51 var wg = sync.WaitGroup{}
52 var arr = []string{"Hello", "World", "People"}
53 wg.Add(len(arr))
54 for _, s := range arr {
55 go func(s string) {
56 defer wg.Done()
57 t.Log(string(utils.SimpleDecrypt(utils.SimpleEncrypt([]byte(s)))))
58 }(s)
59 }
60 wg.Wait()
61}
62
63func TestSimpleEncryptMap(t *testing.T) {
64 var m = maps.Map{

Callers

nothing calls this directly

Calls 6

SimpleDecryptFunction · 0.92
SimpleEncryptFunction · 0.92
DoneMethod · 0.80
LogMethod · 0.80
AddMethod · 0.65
WaitMethod · 0.45

Tested by

no test coverage detected