#include #include #include #include #include #include "meme/0.h" #include "meme/1.h" #include "meme/2.h" using namespace std; using namespace CryptoPP; void decrypt_ecb(unsigned char *data, const int size, const string& key, const string& file) { byte hash[20]; SHA1 sha1; sha1.CalculateDigest(hash,(byte*)&key[0],key.size()); ECB_Mode::Decryption aes(hash,AES::DEFAULT_KEYLENGTH); aes.ProcessData((byte*)data,(byte*)data,size); ofstream out(file.c_str(),ios::binary); out.write((char*)data,size); } void decrypt_ctr(unsigned char *data, const int size, const string& key, const string& file) { byte hash[20]; SHA1 sha1; sha1.CalculateDigest(hash,(byte*)&key[0],key.size()); CTR_Mode::Decryption aes(hash,AES::DEFAULT_KEYLENGTH,hash); aes.ProcessData((byte*)data,(byte*)data,size); ofstream out(file.c_str(),ios::binary); out.write((char*)data,size); } static const int numQuestions=3; static const string questions[numQuestions]={ "How to solve the chicken and egg problem", //answer=6hfvbgsdef "What have I been", //answer=Tro11d "What do I need to go ahead" //answer=Thek3yt0th3n3xtl3v3l }; int main() { cout<<"Which question?"<>question; cin.get(); //Remove the \n if(question<0 || question>=numQuestions) return 1; cout<