#include <cel_crypt.h>

Public Member Functions | |
| virtual const char * | getName () const =0 |
| virtual size_t | getMinimumKeyByteLength () const =0 |
| virtual size_t | getMaximumKeyByteLength () const =0 |
| virtual void | init (const void *inKey, size_t inKeyByteLength)=0 |
| virtual size_t | getBlockLength () const =0 |
| virtual void | encrypt (void *CEL_RESTRICT outResult, const void *CEL_RESTRICT inData) const =0 |
| virtual void | decrypt (void *CEL_RESTRICT outResult, const void *CEL_RESTRICT inData) const =0 |
| virtual AutoPtr< BlockCipher > | duplicate () const =0 |
Static Public Member Functions | |
| static AutoPtr< BlockCipher > | create (const String &inCipherName) |
Definition at line 20 of file cel_crypt.h.
| virtual const char* Celartem::BlockCipher::getName | ( | ) | const [pure virtual] |
This method returns the name of this cipher.
| virtual size_t Celartem::BlockCipher::getMinimumKeyByteLength | ( | ) | const [pure virtual] |
This method returns the minimum length of the key for the instance.
| virtual size_t Celartem::BlockCipher::getMaximumKeyByteLength | ( | ) | const [pure virtual] |
This method returns the maximum length of the key for the instance.
| virtual void Celartem::BlockCipher::init | ( | const void * | inKey, | |
| size_t | inKeyByteLength | |||
| ) | [pure virtual] |
This method initializes the instance with the specified key.
If the key length is smaller than the length obtained by getMinimumKeyByteLength, this method automatically pads 0 to the end of the key binary. If the key length is larger than the length obtained by getMaximumKeyByteLength, this method simply cuts the trailing bytes.
| inKey | Pointer to a buffer which contains the key. | |
| inKeyByteLength | The size of the key in bytes. |
| virtual size_t Celartem::BlockCipher::getBlockLength | ( | ) | const [pure virtual] |
This method returns the block size.
| virtual void Celartem::BlockCipher::encrypt | ( | void *CEL_RESTRICT | outResult, | |
| const void *CEL_RESTRICT | inData | |||
| ) | const [pure virtual] |
This method encrypts the input data.
This method must not update the internal state of the cipher instance since this class regards it as in ECB mode.
| outResult | Pointer to the buffer which receives the encrypted result. The size of this buffer should be larger than the block length returned by getBlockLength method. | |
| inData | Pointer to the buffer which contains the plain data. Only the data of the block length is encrypted by a call to this method. |
| virtual void Celartem::BlockCipher::decrypt | ( | void *CEL_RESTRICT | outResult, | |
| const void *CEL_RESTRICT | inData | |||
| ) | const [pure virtual] |
This method decrypts the input data.
This method must not update the internal state of the cipher instance since this class regards it as in ECB mode.
| outResult | Pointer to the buffer which receives the descrypted result. The size of this buffer should be larger than the block length returned by getBlockLength method. | |
| inData | Pointer to the buffer which contains the encrypted data. Only the data of the block length is decrypted by a call to this method. |
| virtual AutoPtr<BlockCipher> Celartem::BlockCipher::duplicate | ( | ) | const [pure virtual] |
This method duplicates the instance.
| static AutoPtr<BlockCipher> Celartem::BlockCipher::create | ( | const String & | inCipherName | ) | [static] |
This method creates a new instance of Cipher class.
| inCipherName | The name of the cipher. This method currently accepts the following cipher names:
|