#include <AbstractCrypter.h>

Public Member Functions | |
| TAbstractCrypter () | |
| virtual Retval | encode (const IByteArray &rInput, IByteArray &rOutput)=0 |
| virtual Retval | decode (const IByteArray &rInput, IByteArray &rOutput)=0 |
| virtual Int | getBlockSizeForDecoding () const =0 |
| virtual Int | getBlockSizeForEncoding () const =0 |
| virtual void | setKey (Uint64 uldKey)=0 |
| virtual void | setKey (const IByteArray &rKey)=0 |
Protected Member Functions | |
| virtual | ~TAbstractCrypter () |
| TAbstractCrypter::TAbstractCrypter | ( | ) |
Creates an abstract crypter object
| TAbstractCrypter::~TAbstractCrypter | ( | ) | [protected, virtual] |
Destroys the crypter object
| virtual Retval zeus::TAbstractCrypter::encode | ( | const IByteArray & | rInput, | |
| IByteArray & | rOutput | |||
| ) | [pure virtual] |
encodes a clear text into a cipher text. This method takes an input array of size from getBlockSizeForEncoding(). Each crypting algorithm might need a different input size (8bit or 64bit blocks, ...). The output array contains the cipher text (size of getBlockSizeForDecoding() bytes.
| rInput | : Clear text input | |
| rOutput,: | Cipher text output |
| RET_NOERROR | : Text encoded | |
| RET_REQUEST_FAILED | : Could not encode the text. The block size of the clear text might be wrong |
Implemented in zeus::TBlockCipherXTEA, zeus::TSimpleDES, and TStandardZipEncryption.
| virtual Retval zeus::TAbstractCrypter::decode | ( | const IByteArray & | rInput, | |
| IByteArray & | rOutput | |||
| ) | [pure virtual] |
encodes a cypher text into a clear text. This method takes an input array of size from getBlockSizeForDecoding().
| rInput | : Cipher text input | |
| rOutput,: | Clear text output |
| RET_NOERROR | : Text encoded | |
| RET_REQUEST_FAILED | : Could not encode the text. The block size of the cipher text might be wrong |
Implemented in zeus::TBlockCipherXTEA, zeus::TSimpleDES, and TStandardZipEncryption.
| virtual Int zeus::TAbstractCrypter::getBlockSizeForDecoding | ( | ) | const [pure virtual] |
Returns the number of the bytes for decoding the data (cipher text to clear text)
Implemented in zeus::TBlockCipherXTEA, zeus::TSimpleDES, and TStandardZipEncryption.
| virtual Int zeus::TAbstractCrypter::getBlockSizeForEncoding | ( | ) | const [pure virtual] |
Returns the number of the bytes for encoding the data (clear text to cipher text)
Implemented in zeus::TBlockCipherXTEA, zeus::TSimpleDES, and TStandardZipEncryption.
| virtual void zeus::TAbstractCrypter::setKey | ( | Uint64 | uldKey | ) | [pure virtual] |
Sets a 64bit (or less) key
Implemented in zeus::TBlockCipherXTEA, zeus::TSimpleDES, and TStandardZipEncryption.
| virtual void zeus::TAbstractCrypter::setKey | ( | const IByteArray & | rKey | ) | [pure virtual] |
Sets a n-bit key
Implemented in zeus::TBlockCipherXTEA, zeus::TSimpleDES, and TStandardZipEncryption.