zeus::TAbstractCrypter Class Reference

#include <AbstractCrypter.h>

Inheritance diagram for zeus::TAbstractCrypter:

zeus::TZObject zeus::IZUnknown TStandardZipEncryption zeus::TBlockCipherXTEA zeus::TSimpleDES

List of all members.

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 ()


Detailed Description

Class implements the abstract crypter

Constructor & Destructor Documentation

TAbstractCrypter::TAbstractCrypter (  ) 

Creates an abstract crypter object

TAbstractCrypter::~TAbstractCrypter (  )  [protected, virtual]

Destroys the crypter object


Member Function Documentation

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.

Parameters:
rInput : Clear text input
rOutput,: Cipher text output
Return values:
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().

Parameters:
rInput : Cipher text input
rOutput,: Clear text output
Return values:
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.


The documentation for this class was generated from the following files:


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Wed Oct 28 21:42:33 2009