The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

ModuleMD5 Class Reference

Inheritance diagram for ModuleMD5:

Inheritance graph
[legend]
Collaboration diagram for ModuleMD5:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ModuleMD5 (InspIRCd *Me)
virtual ~ModuleMD5 ()
virtual const char * OnRequest (Request *request)
 Called whenever a Request class is sent to your module by another module.
virtual Version GetVersion ()
 Returns the version number of a Module.

Private Member Functions

void byteSwap (word32 *buf, unsigned words)
void MD5Init (MD5Context *ctx, unsigned int *ikey=NULL)
void MD5Update (MD5Context *ctx, byte const *buf, int len)
void MD5Final (byte digest[16], MD5Context *ctx)
void MD5Transform (word32 buf[4], word32 const in[16])
void MyMD5 (void *dest, void *orig, int len, unsigned int *ikey)
void GenHash (const char *src, char *dest, const char *xtab, unsigned int *ikey, size_t srclen)

Private Attributes

unsigned int * key
char * chars

Detailed Description

Definition at line 50 of file m_md5.cpp.


Constructor & Destructor Documentation

ModuleMD5::ModuleMD5 InspIRCd Me  )  [inline]
 

Definition at line 267 of file m_md5.cpp.

References ModuleManager::Attach(), I_OnRequest, InspIRCd::Modules, ModuleManager::PublishInterface(), and Module::ServerInstance.

virtual ModuleMD5::~ModuleMD5  )  [inline, virtual]
 

Definition at line 275 of file m_md5.cpp.

References InspIRCd::Modules, Module::ServerInstance, and ModuleManager::UnpublishInterface().


Member Function Documentation

void ModuleMD5::byteSwap word32 buf,
unsigned  words
[inline, private]
 

Definition at line 52 of file m_md5.cpp.

Referenced by MD5Final(), and MD5Update().

void ModuleMD5::GenHash const char *  src,
char *  dest,
const char *  xtab,
unsigned int *  ikey,
size_t  srclen
[inline, private]
 

Definition at line 248 of file m_md5.cpp.

References MyMD5().

Referenced by OnRequest().

virtual Version ModuleMD5::GetVersion  )  [inline, virtual]
 

Returns the version number of a Module.

The method should return a Version object with its version information assigned via Version::Version

Reimplemented from Module.

Definition at line 311 of file m_md5.cpp.

References API_VERSION, VF_SERVICEPROVIDER, and VF_VENDOR.

void ModuleMD5::MD5Final byte  digest[16],
MD5Context ctx
[inline, private]
 

Definition at line 123 of file m_md5.cpp.

References MD5Context::buf, MD5Context::bytes, byteSwap(), MD5Context::in, and MD5Transform().

Referenced by MyMD5().

void ModuleMD5::MD5Init MD5Context ctx,
unsigned int *  ikey = NULL
[inline, private]
 

Definition at line 64 of file m_md5.cpp.

References MD5Context::buf, and MD5Context::bytes.

Referenced by MyMD5().

void ModuleMD5::MD5Transform word32  buf[4],
word32 const   in[16]
[inline, private]
 

Definition at line 155 of file m_md5.cpp.

References F1, F2, F3, F4, and MD5STEP.

Referenced by MD5Final(), and MD5Update().

void ModuleMD5::MD5Update MD5Context ctx,
byte const *  buf,
int  len
[inline, private]
 

Definition at line 86 of file m_md5.cpp.

References MD5Context::buf, MD5Context::bytes, byteSwap(), MD5Context::in, and MD5Transform().

Referenced by MyMD5().

void ModuleMD5::MyMD5 void *  dest,
void *  orig,
int  len,
unsigned int *  ikey
[inline, private]
 

Definition at line 239 of file m_md5.cpp.

References MD5Final(), MD5Init(), and MD5Update().

Referenced by GenHash().

virtual const char* ModuleMD5::OnRequest Request request  )  [inline, virtual]
 

Called whenever a Request class is sent to your module by another module.

Please see the documentation of Request::Send() for further information. The Request sent can always be assumed to be non-NULL, you should not change the request object or its data. Your method may return arbitary data in the char* result which the requesting module may be able to use for pre-determined purposes (e.g. the results of an SQL query, etc).

Parameters:
request The Request class being received

Reimplemented from Module.

Definition at line 281 of file m_md5.cpp.

References chars, GenHash(), HashRequest::GetHashData(), Request::GetId(), HashRequest::GetKeyData(), HashRequest::GetOutputs(), key, and MAXBUF.


Member Data Documentation

char* ModuleMD5::chars [private]
 

Definition at line 263 of file m_md5.cpp.

Referenced by OnRequest().

unsigned int* ModuleMD5::key [private]
 

Definition at line 262 of file m_md5.cpp.

Referenced by OnRequest().


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