#include#include "CBlock/AES.h" int main() { std::string plain_text = "Hello, World!"; std::string key = "MySecretKey123456"; CBlock::AES aes(key, CBlock::AES::KEY_128); std::string cipher_text = aes.Encrypt(plain_text); std::cout << "Encrypted Text: " << cipher_text << std::endl; return 0; }
#includePackage/Library: CBlock is a package/library that provides an implementation of several cryptographic block algorithms.#include "CBlock/DES.h" int main() { std::string cipher_text = "U2FsdGVkX18S38E6DMycIO6UdmKR/RUZ"; std::string key = "MySecretKey"; CBlock::DES des(key); std::string plain_text = des.Decrypt(cipher_text); std::cout << "Decrypted Text: " << plain_text << std::endl; return 0; }