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

Function generateKey

C2_Client_Go/encode/encode.go:44–53  ·  view source on GitHub ↗
(key []byte)

Source from the content-addressed store, hash-verified

42}
43
44func generateKey(key []byte) (genKey []byte) {
45 genKey = make([]byte, 16)
46 copy(genKey, key)
47 for i := 16; i < len(key); {
48 for j := 0; j < 16 && i < len(key); j, i = j+1, i+1 {
49 genKey[j] ^= key[i]
50 }
51 }
52 return genKey
53}
54
55func Encodestr(str string, uuid string) string {
56 uuidnew := uuid[len(uuid)-16:]

Callers 2

AESEncryptFunction · 0.70
AESDecryptFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected