MADARA
3.2.3
|
Encrypts a buffer with 256 bit AES via OpenSSL. More...
#include <AESBufferFilter.h>
Public Member Functions | |
AESBufferFilter () | |
Constructor. More... | |
AESBufferFilter (const AESBufferFilter &input) | |
Copy constructor. More... | |
AESBufferFilter (unsigned char *key, int key_length) | |
256 bit key constructor More... | |
virtual | ~AESBufferFilter () |
Destructor. More... | |
virtual int | decode (unsigned char *source, int size, int max_size) const |
Decodes the buffer in place using AES encryption. More... | |
virtual int | encode (unsigned char *source, int size, int max_size) const |
Encodes the buffer in place using AES encryption. More... | |
int | generate_key (const std::string &password) |
Generates a 256 bit key from a password. More... | |
Private Attributes | |
utility::ScopedArray< unsigned char > | iv_ |
initialization vector More... | |
utility::ScopedArray< unsigned char > | key_ |
the user's cypher key More... | |
Encrypts a buffer with 256 bit AES via OpenSSL.
Definition at line 29 of file AESBufferFilter.h.
madara::filters::AESBufferFilter::AESBufferFilter | ( | ) |
Constructor.
Definition at line 14 of file AESBufferFilter.cpp.
madara::filters::AESBufferFilter::AESBufferFilter | ( | const AESBufferFilter & | input | ) |
Copy constructor.
input | the buffer filter to copy |
Definition at line 21 of file AESBufferFilter.cpp.
madara::filters::AESBufferFilter::AESBufferFilter | ( | unsigned char * | key, |
int | key_length | ||
) |
256 bit key constructor
key | the key to use for encryption |
key_length | the length of the key |
Definition at line 29 of file AESBufferFilter.cpp.
|
virtual |
Destructor.
Definition at line 37 of file AESBufferFilter.cpp.
|
virtual |
Decodes the buffer in place using AES encryption.
source | the source and destination buffer |
size | the amount of data in the buffer in bytes |
max_size | the amount of bytes the buffer can hold |
decryption context
Implements madara::filters::BufferFilter.
Definition at line 150 of file AESBufferFilter.cpp.
|
virtual |
Encodes the buffer in place using AES encryption.
source | the source and destination buffer |
size | the amount of data in the buffer in bytes |
max_size | the amount of bytes the buffer can hold |
encryption context
Implements madara::filters::BufferFilter.
Definition at line 69 of file AESBufferFilter.cpp.
int madara::filters::AESBufferFilter::generate_key | ( | const std::string & | password | ) |
Generates a 256 bit key from a password.
password | a password to seed the key with |
Definition at line 41 of file AESBufferFilter.cpp.
|
private |
initialization vector
Definition at line 86 of file AESBufferFilter.h.
|
private |
the user's cypher key
Definition at line 83 of file AESBufferFilter.h.