MCPcopy Create free account
hub / github.com/TryGOTry/C2_Demo / Encodestr

Function Encodestr

C2_Client_Go/encode/encode.go:55–65  ·  view source on GitHub ↗
(str string, uuid string)

Source from the content-addressed store, hash-verified

53}
54
55func Encodestr(str string, uuid string) string {
56 uuidnew := uuid[len(uuid)-16:]
57 //fmt.Println(uuidnew)
58 msgstr := []byte(str)
59 key := []byte(uuidnew)
60 //fmt.Println(uuidnew)
61 a := AESEncrypt(msgstr, key)
62
63 b := hex.EncodeToString(a)
64 return b
65}
66func Decodestr(str string, uuid string) string {
67 //fmt.Println("hex:", str)
68 a, _ := hex.DecodeString(str)

Callers

nothing calls this directly

Calls 1

AESEncryptFunction · 0.70

Tested by

no test coverage detected