pluto  1
Small utility library for UUIDs, SHA1, and Encryption
Public Member Functions | List of all members
plt::TeaCrypter Class Reference

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...
 

Detailed Description

Encryption functionality of Pluto.

Uses the Tiny Encryption Algorithm (https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm) to encrypt data.

Constructor & Destructor Documentation

§ TeaCrypter()

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:

  1. the data itself
  2. How large the data is
  3. Key used to decrypt the data
    Parameters
    ptrdata to be encrypted
    sizeof_dataSize of the data
    keynumber used to decrypt the data

Member Function Documentation

§ DecryptData()

void plt::TeaCrypter::DecryptData ( )

DecryptData - invoke the decryption of the data.

This function will decrypt the data

Returns
void

§ EncryptData()

void plt::TeaCrypter::EncryptData ( )

EncryptData - invoke the encryption of the data.

This function will encrypt the data

Returns
void

§ GetData()

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.

Returns
void* the data that is stored in the TeaCrypter

§ GetMemoryErr()

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.

Returns
void

The documentation for this class was generated from the following file: