Fawkes API
Fawkes Development Version
|
#include <>>
Public Member Functions | |
MessageDecryptor (const unsigned char *key, const unsigned char *iv) | |
Constructor. More... | |
~MessageDecryptor () | |
Empty destructor. More... | |
void | set_plain_buffer (void *buffer, size_t buffer_length) |
Set plain buffer. More... | |
void | set_crypt_buffer (void *buffer, size_t buffer_length) |
Set crypted buffer. More... | |
size_t | decrypt () |
Decrypt. More... | |
Message decryptor. This class is used to decrypt world info message after they have been received.
This is the opposite part of MessageEncryptor.
This implementation uses OpenSSL for the AES encryption (in fact it uses the accompanying libcrypto that comes with OpenSSL, not libopenssl itself). It is almost everywhere available and easy to use.
fawkes::MessageDecryptor::MessageDecryptor | ( | const unsigned char * | key, |
const unsigned char * | iv | ||
) |
Constructor.
key | encryption key |
iv | initialisation vector |
Definition at line 72 of file decrypt.cpp.
fawkes::MessageDecryptor::~MessageDecryptor | ( | ) |
Empty destructor.
Definition at line 84 of file decrypt.cpp.
size_t fawkes::MessageDecryptor::decrypt | ( | ) |
Decrypt.
Do the decryption.
Definition at line 117 of file decrypt.cpp.
void fawkes::MessageDecryptor::set_crypt_buffer | ( | void * | buffer, |
size_t | buffer_length | ||
) |
Set crypted buffer.
This is the source buffer which is decrypted.
buffer | crypted text buffer |
buffer_length | crypted text buffer length |
Definition at line 106 of file decrypt.cpp.
void fawkes::MessageDecryptor::set_plain_buffer | ( | void * | buffer, |
size_t | buffer_length | ||
) |
Set plain buffer.
This is the destination buffer to which the decrypted plain text is written.
buffer | plain text buffer |
buffer_length | plain text buffer length |
Definition at line 94 of file decrypt.cpp.