tcMenu
Public Member Functions | List of all members
tcremote::EncryptionHandler Class Referenceabstract

#include <BaseBufferedRemoteTransport.h>

Public Member Functions

virtual int encryptData (const uint8_t *plainText, int bytesIn, const uint8_t *buffer, size_t buffLen)=0
 
virtual int decryptData (const uint8_t *encoded, int bytesIn, const uint8_t *buffer, size_t buffLen)=0
 

Detailed Description

An implementation of this class can both encrypt and decrypt data on behalf of a BaseBufferedTagValTransport instance.

Member Function Documentation

◆ encryptData()

virtual int tcremote::EncryptionHandler::encryptData ( const uint8_t *  plainText,
int  bytesIn,
const uint8_t *  buffer,
size_t  buffLen 
)
pure virtual

Encrypt plain text data into encrypted format into the buffer

Parameters
plainTextthe plain bytes to encrypt
bytesInthe number of bytes to encrypt
bufferthe output encrypted message
buffLenthe buffer maximum length
Returns
the number of bytes encrypted or 0 if it fails.

◆ decryptData()

virtual int tcremote::EncryptionHandler::decryptData ( const uint8_t *  encoded,
int  bytesIn,
const uint8_t *  buffer,
size_t  buffLen 
)
pure virtual

Decrypt data from the wire into plain text and store the output into the buffer

Parameters
encodedthe encoded data to decrypt
bytesInthe number of encoded bytes to decrypt
bufferthe buffer to output plaintext to
buffLenthe size of the buffer
Returns
the number of bytes returned, or 0 if it fails.

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