In my program, I must determine the cipher type dynamically and so create the
corresponding cipher object dynamically. Therefore, in definition, I need to define a
variable as the pointer of the base class for all cipher class, like this:
TheBaseCipherForAllCiphers *pCipher;
Then in implementation, I will do like this:
switch(nCipherAlgorithm)
{
case CIPHER_AES:
pCipher = new CFB_Mode<AES >::Encryption(key, AES::DEFAULT_KEYLENGTH, iv);
break;
case CIPHER_ARC4:
pCipher = new ARC4(key, keySize);
break;
}
pCipher->ProcessString(lpBuf, nCount);
The problem is, I cannot find the appropriate class in place of
TheBaseCipherForAllCiphers. I try SymmetricCipherDocumentation, but always get a
compiler error.