Main Page   Class Hierarchy   Compound List   File List   Compound Members  

SmartSockets::TipcMtEncrypt Class Reference

#include <tmt.h>

List of all members.

Public Types

typedef void(TipcMtEncrypt::* Handler )(void *&data, int4 &dataSize, const void *key, int4 keySize)

Public Methods

 TipcMtEncrypt ()
void setEncryptHandler (Handler encryptMethod)
Handler getEncryptHandler ()
void setDecryptHandler (Handler decryptMethod)
Handler getDecryptHandler ()
virtual ~TipcMtEncrypt () throw ()
virtual void encrypt (void *&data, int4 &dataSize, const void *key, int4 keySize) throw (TipcException)
virtual void decrypt (void *&data, int4 &dataSize, const void *key, int4 keySize) throw (TipcException)

Static Public Methods

void T_ENTRY encryptFuncDelegator (T_BUF buf, T_PTR key, T_INT4 key_size, T_PTR arg)
void T_ENTRY decryptFuncDelegator (T_BUF buf, T_PTR key, T_INT4 key_size, T_PTR arg)


Detailed Description

Encryption and Decryption class for Message types. Used with TipcMt::setEncryptObj(), TipcMt::setDecryptObj(), and triggered whenever TipcMsg::encrypt() or TipcMsg::decrypt() is called. Note that not only encryption (for data scrambling) can be done, but also data compression. The message header is left intact with this mechanism.


Member Typedef Documentation

typedef void(TipcMtEncrypt::* SmartSockets::TipcMtEncrypt::Handler)(void*& data, int4& dataSize, const void* key, int4 keySize)
 

Method signature for encryption and decryption methods.

Warning:
If the data needs to grow (e.g. be reallocated) then the new char[<size>]; operator should be
used.

Parameters:
data  the user data portion of the message to be encrypted/decrypted serialized in a binary blob. This parameter is also used to return the encrypted/decrypted data.
dataSize  the number of bytes in the user data binary blob. This parameter is also used to return the size of the encrypted/decrypted data.
key  the key to encrypt/decrypt the data set using the TipcMt::setKey() method.
keySize  the number of bytes in the key.


Constructor & Destructor Documentation

SmartSockets::TipcMtEncrypt::TipcMtEncrypt  
 

constructor that sets the default handler method to onTraverse().

virtual SmartSockets::TipcMtEncrypt::~TipcMtEncrypt   throw () [virtual]
 

Destructor.


Member Function Documentation

virtual void SmartSockets::TipcMtEncrypt::decrypt void *&    data,
int4 &    dataSize,
const void *    key,
int4    keySize
throw (TipcException) [virtual]
 

Default implementation for an decryption method that doesn't do anything.

Parameters:
data  the user data portion of the message to be encrypted serialized in a binary blob. This parameter is also used to return the encrypted data. If the data needs to grow (e.g. be reallocated) then the new char[<size>]; operator should be used.
dataSize  the number of bytes in the user data binary blob. This parameter is also used to return the size of the encrypted data.
key  the key to encrypt the data set using the TipcMt::setKey() method.
keySize  the number of bytes in the key.

virtual void SmartSockets::TipcMtEncrypt::encrypt void *&    data,
int4 &    dataSize,
const void *    key,
int4    keySize
throw (TipcException) [virtual]
 

Default implementation for an encryption method that doesn't do anything.

Parameters:
data  the user data portion of the message to be encrypted serialized in a binary blob. This parameter is also used to return the encrypted data.
dataSize  the number of bytes in the user data binary blob. This parameter is also used to return the size of the encrypted data. If the data needs to grow (e.g. be reallocated) then the new char[<size>]; operator should be used.
key  the key to encrypt the data set using the TipcMt::setKey() method.
keySize  the number of bytes in the key.

Handler SmartSockets::TipcMtEncrypt::getDecryptHandler  
 

Gets the current decrypt handler method.

Handler SmartSockets::TipcMtEncrypt::getEncryptHandler  
 

Gets the current encrypt handler method.

void SmartSockets::TipcMtEncrypt::setDecryptHandler Handler    decryptMethod
 

Sets the current decrypt handler method; if this is not called, the default method decrypt() is called.

Parameters:
encryptMethod  a method conforming to the TipcMtEncrypt::Handler.

void SmartSockets::TipcMtEncrypt::setEncryptHandler Handler    encryptMethod
 

Sets the current encrypt handler method; if this is not called, the default method encrypt() is called.


The documentation for this class was generated from the following file:
Generated on Fri Jul 14 15:05:56 2006 by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001