The common base of symmetric ciphers is SymmetricCipher. This fact is
documented here:
http://cryptopp.sourceforge.net/docs/ref5/struct_symmetric_cipher_documentation.html

On Mon, Jun 09, 2003 at 07:56:37AM +0800, ccw wrote:
> 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.

Reply via email to