![]() |
pluto
1
Small utility library for UUIDs, SHA1, and Encryption
|
Encryption functionality of Pluto. More...
#include <TeaCrypter.h>
Public Member Functions | |
TeaCrypter (void *ptr, unsigned int sizeof_data, uint32_t *key) | |
Default constructor for TEA crypter. More... | |
void | EncryptData () |
EncryptData - invoke the encryption of the data. More... | |
void | DecryptData () |
DecryptData - invoke the decryption of the data. More... | |
void * | GetData () |
GetData - Pull the data that is going to be encrypted. More... | |
bool | GetMemoryErr () const |
GetMemoryErr - Retrieve errors by TeaCrypter. More... | |
Encryption functionality of Pluto.
Uses the Tiny Encryption Algorithm (https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm) to encrypt data.
plt::TeaCrypter::TeaCrypter | ( | void * | ptr, |
unsigned int | sizeof_data, | ||
uint32_t * | key | ||
) |
Default constructor for TEA crypter.
Constructor calls for a description of the data being encrypted, such as:
ptr | data to be encrypted |
sizeof_data | Size of the data |
key | number used to decrypt the data |
void plt::TeaCrypter::DecryptData | ( | ) |
DecryptData - invoke the decryption of the data.
This function will decrypt the data
void plt::TeaCrypter::EncryptData | ( | ) |
EncryptData - invoke the encryption of the data.
This function will encrypt the data
void* plt::TeaCrypter::GetData | ( | ) |
GetData - Pull the data that is going to be encrypted.
This function will return the data that is going to be encrypted by pluto. Mostly for debugging purposes.
bool plt::TeaCrypter::GetMemoryErr | ( | ) | const |
GetMemoryErr - Retrieve errors by TeaCrypter.
Used for debugging, this will let the user know if any fatal errors involving memory have occured.