#include #define KEYSIZE 8 /************************************************************* ** crypto is a very simple 'Block cipher' encryption class ** *************************************************************/ class Crypto { private: char key[KEYSIZE+1]; public: Crypto(char *inputkey); char *blockcipher(char *data, int max); }; /***************************************************** ** constructor initialized with a key that is used ** ** to both encrypt and decrypt the same data. ** *****************************************************/ Crypto::Crypto(char *inputkey) { strncpy(key,inputkey,KEYSIZE); srand(42); // the answer to the Universe int x = rand(); for (int j=0; j