#include <rc4encryptor.h>
- Author
- Joris Guisson joris.nosp@m..gui.nosp@m.sson@.nosp@m.gmai.nosp@m.l.com
RC4 encryptor. Uses the RC4 algorithm to encrypt and decrypt data. This class has a static encryption buffer, which makes it not thread safe because the buffer is not protected by mutexes.
Definition at line 41 of file rc4encryptor.h.
◆ decrypt()
void mse::RC4Encryptor::decrypt |
( |
Uint8 * |
data, |
|
|
Uint32 |
len |
|
) |
| |
Decrypt some data, decryption happens in place (original data gets overwritten)
- Parameters
-
data | The data |
len | Size of the data |
◆ encrypt()
const Uint8* mse::RC4Encryptor::encrypt |
( |
const Uint8 * |
data, |
|
|
Uint32 |
len |
|
) |
| |
Encrypt the data. Encryption happens into the static buffer. So that the data passed to this function is never overwritten. If we send pieces we point directly to the mmap region of data, this cannot be overwritten, hence the static buffer.
- Parameters
-
data | The data |
len | The length of the data |
- Returns
- Pointer to the static buffer
◆ encryptReplace()
void mse::RC4Encryptor::encryptReplace |
( |
Uint8 * |
data, |
|
|
Uint32 |
len |
|
) |
| |
Encrypt data, encryption will happen in the same buffer. So data will be changed replaced by it's encrypted version.
- Parameters
-
data | The data to encrypt |
len | The length of the data |
The documentation for this class was generated from the following file: