MCPcopy Create free account
hub / github.com/S3N4T0R-0X0/PixelCode-Attack / AESCipherTCP

Method AESCipherTCP

payload.cpp:801–807  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

799
800public:
801 AESCipherTCP(const std::string& key_str) {
802 key = std::vector<uint8_t>(key_str.begin(), key_str.end());
803 if (key.size() != 16 && key.size() != 24 && key.size() != 32) {
804 throw std::runtime_error("Key must be 16, 24, or 32 bytes long");
805 }
806 AES_init_ctx(&ctx, key.data());
807 }
808
809 std::vector<uint8_t> encrypt(const std::string& raw) {
810 std::vector<uint8_t> data(raw.begin(), raw.end());

Callers

nothing calls this directly

Calls 1

AES_init_ctxFunction · 0.85

Tested by

no test coverage detected