#include <DataBlockEncryptor.h>
Public Member Functions | |
bool | IsKeySet (void) const |
void | SetKey (const unsigned char key[16]) |
Set the encryption key. | |
void | UnsetKey (void) |
Unset the encryption key. | |
void | Encrypt (unsigned char *input, unsigned int inputLength, unsigned char *output, unsigned int *outputLength, RakNetRandom *rnr) |
Encryption adds 6 data bytes and then pads the number of bytes to be a multiple of 16. | |
bool | Decrypt (unsigned char *input, unsigned int inputLength, unsigned char *output, unsigned int *outputLength) |
Decryption removes bytes, as few as 6. |
bool DataBlockEncryptor::Decrypt | ( | unsigned char * | input, | |
unsigned int | inputLength, | |||
unsigned char * | output, | |||
unsigned int * | outputLength | |||
) |
Decryption removes bytes, as few as 6.
Output should be large enough to hold this. Output can be the same memory block as input
[in] | input | the input buffer to decrypt |
[in] | inputLength | the size of the input buffer |
[in] | output | the output buffer to store decrypted data |
[in] | outputLength | the size of the output buffer |
void DataBlockEncryptor::Encrypt | ( | unsigned char * | input, | |
unsigned int | inputLength, | |||
unsigned char * | output, | |||
unsigned int * | outputLength, | |||
RakNetRandom * | rnr | |||
) |
Encryption adds 6 data bytes and then pads the number of bytes to be a multiple of 16.
Output should be large enough to hold this. Output can be the same memory block as input
[in] | input | the input buffer to encrypt |
[in] | inputLength | the size of the input buffer |
[in] | output | the output buffer to store encrypted data |
[in] | outputLength | the size of the output buffer |
bool DataBlockEncryptor::IsKeySet | ( | void | ) | const |
void DataBlockEncryptor::SetKey | ( | const unsigned char | key[16] | ) |
Set the encryption key.
[in] | key | The new encryption key |