Hi everyone,

I'm trying to see how the following snippet uses DES:

byte key[]=
{'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
byte plainText[]= {0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74};
byte cbCipherText[64];
ECB_Mode<DES>::Encryption Encryptor;
Encryptor.SetKey(key, 8);
Encryptor.ProcessData(cbCipherText, plainText, 64);

I want to locate where Encryptor.SetKey() and Encryptor.ProcessData()
are implemented. First, I track the following snippet in "modes.h"
//! ECB mode
template <class CIPHER>
struct ECB_Mode : public CipherModeDocumentation
{
        typedef CipherModeFinalTemplate_CipherHolder<CPP_TYPENAME
CIPHER::Encryption, ECB_OneWay> Encryption;
        typedef CipherModeFinalTemplate_CipherHolder<CPP_TYPENAME
CIPHER::Decryption, ECB_OneWay> Decryption;
};

It seems Encryption is object of CipherModeFinalTemplate_CipherHolder,
so I track it in the same file

//! _
template <class CIPHER, class BASE>
class CipherModeFinalTemplate_CipherHolder : protected
ObjectHolder<CIPHER>, public AlgorithmImpl<BASE,
CipherModeFinalTemplate_CipherHolder<CIPHER, BASE> >
{...

However, I can find neither SetKey() nor ProcessData() in
CipherModeFinalTemplate_CipherHolder. Can anyone give me some hint?
How can I track down all the way to the implementation details of DES,
which I believe should be in "des.cpp"? Thanks in advance.

-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.

Reply via email to