utils::Cipher Class Reference

#include <cipher.h>

Inheritance diagram for utils::Cipher:

utils::Singleton< Cipher > List of all members.

Detailed Description

A helper class for the encoding of strings using different algorithms.

Notes:

Definition at line 42 of file cipher.h.

Public Member Functions

std::string md5 (const std::string &str)
 Encode using the MD5 digest algorithm.

Private Member Functions

 Cipher (void) throw ()
 Default constructor.
 ~Cipher (void) throw ()
 Destructor.
 Cipher (const Cipher &rhs)
 Copy constructor.
Cipheroperator= (const Cipher &rhs)
 Assignment operator.
std::string toHex (const unsigned char *str, const unsigned short length)
 Convert a string into hexadecimal.

Friends

class Singleton<Cipher>


Constructor & Destructor Documentation

utils::Cipher::Cipher void   )  throw () [private]
 

Default constructor.

Definition at line 38 of file cipher.cpp.

utils::Cipher::~Cipher void   )  throw () [private]
 

Destructor.

Definition at line 48 of file cipher.cpp.

utils::Cipher::Cipher const Cipher rhs  )  [private]
 

Copy constructor.


Member Function Documentation

std::string utils::Cipher::md5 const std::string &  str  ) 
 

Encode using the MD5 digest algorithm.

Parameters:
str the string to encode.
Returns:
the MD5 digest hash string.

Definition at line 59 of file cipher.cpp.

Cipher& utils::Cipher::operator= const Cipher rhs  )  [private]
 

Assignment operator.

std::string utils::Cipher::toHex const unsigned char *  str,
const unsigned short  length
[private]
 

Convert a string into hexadecimal.

Parameters:
str the string to convert.
length the string length.
Returns:
the hexadecimal string.

Definition at line 80 of file cipher.cpp.


Friends And Related Function Documentation

friend class Singleton<Cipher> [friend]
 

Definition at line 45 of file cipher.h.


The documentation for this class was generated from the following files:
Generated on Fri Mar 30 15:39:19 2007 for TMW Server by  doxygen 1.3.9.1