After copying over the code from Classes as parameter of function c++ into my code, I am getting the error: note: because the following virtual functions are pure within 'TEA':
and XTEA, but only those two functions. The other functions, AES, BLOWFISH, CAMELLIA, RC4, RC5, RC6, etc. are all working. Its just those two functions that are erroring. I don't get why.
code from link (slightly modified):
class CryptoAlgorithm
{
public:
virtual std::string encrypt(std::string DATA) = 0;
virtual std::string decrypt(std::string DATA) = 0;
virtual void setkey(std::string KEY) = 0;
};
and TEA setkey()
void setkey(std::string KEY,
unsigned int ROUNDS = 64,
uint32_t DELTA = 0x9e3779b9, uint32_t TOTAL = 0xc6ef3720)
All of the functions in the other classes are the same. encrypt/decrypt only have std::string DATA
as their arguments. void setkey
has std::string KEY
and other optional arguments. However, functions like RC6, whose setkey
also has other optional arguments does not error.
Any reason why?
Also, all of the classes have : public CryptoAlgorithm
next to their declarations.