#include #include #include int main() { std::string key = "sss"; uint8_t ik[32]{}; hash(key.c_str(), ik); int offset = 16; char* msg = new char[256]{}; memset(msg, 0, 256); auto len = std::snprintf(msg + offset, 256 - offset, "%s", "hello world"); std::cout << encrypt(ik, (uint8_t*)msg, len + offset) << std::endl; std::cout << msg + offset << std::endl; uint8_t ik2[32]{}; hash(key.c_str(), ik2); std::cout << decrypt(ik2, (uint8_t*)msg, len + offset) << std::endl; std::cout << msg + offset << std::endl; return 0; }