#include <cipher.h>
Public Member Functions | |
| virtual auto_ptr< ByteArray > | encrypt (ByteArray &plain_text, ByteArray &initialization_vector)=0 |
| Encrypts a plain text using the internal crypto algorithm and the internal key. | |
| virtual auto_ptr< ByteArray > | decrypt (ByteArray &cipher_text, ByteArray &initialization_vector)=0 |
| Decrypts a cipher text using the internal crypto algorithm and the internal key. | |
| virtual auto_ptr< ByteArray > | computeIntegrity (ByteArray &data_buffer)=0 |
| Computes the integrity of a data buffer using the internal auth algorithm and the internal key. | |
| virtual auto_ptr< ByteArray > | hmac (ByteArray &data_buffer, ByteArray &hmac_key)=0 |
| Generates a HMAC value using the internal auth algorithm, a data buffer and a key. | |
Public Attributes | |
| uint32_t | encr_block_size |
| Encryption block size. | |
| uint32_t | integ_hash_size |
| Integrity hash size. | |
This class holds internally the keys, so it is no needed to pass them as argument.
| virtual auto_ptr<ByteArray> openikev2::Cipher::encrypt | ( | ByteArray & | plain_text, | |
| ByteArray & | initialization_vector | |||
| ) | [pure virtual] |
Encrypts a plain text using the internal crypto algorithm and the internal key.
| plain_text | Plain text to be encrypted. Its size must be multiple of the block size. | |
| initialization_vector | Initialization vector. Its size must be equal to the block size |
| virtual auto_ptr<ByteArray> openikev2::Cipher::decrypt | ( | ByteArray & | cipher_text, | |
| ByteArray & | initialization_vector | |||
| ) | [pure virtual] |
Decrypts a cipher text using the internal crypto algorithm and the internal key.
| cipher_text | Cipher text to be decrypted. Its size must be multiple of the block size. | |
| initialization_vector | Initialization vector. Its size must be equal to the block size |
| virtual auto_ptr<ByteArray> openikev2::Cipher::computeIntegrity | ( | ByteArray & | data_buffer | ) | [pure virtual] |
Computes the integrity of a data buffer using the internal auth algorithm and the internal key.
| data_buffer | Data buffer to compute its integrity |
| virtual auto_ptr<ByteArray> openikev2::Cipher::hmac | ( | ByteArray & | data_buffer, | |
| ByteArray & | hmac_key | |||
| ) | [pure virtual] |
Generates a HMAC value using the internal auth algorithm, a data buffer and a key.
| data_buffer | Data buffer to compute the HMAC value | |
| hmac_key | Key to compute the HMAC value |
1.5.1