Anope IRC Services  Version 2.0
Public Member Functions | Private Types | Private Member Functions | Private Attributes
MD5Context Class Reference
Inheritance diagram for MD5Context:
Inheritance graph
[legend]
Collaboration diagram for MD5Context:
Collaboration graph
[legend]

Public Member Functions

 MD5Context (Encryption::IV *iv=NULL)
 
void Update (const unsigned char *input, size_t len) anope_override
 
void Finalize () anope_override
 
Encryption::Hash GetFinalizedHash () anope_override
 
- Public Member Functions inherited from Encryption::Context
virtual ~Context ()
 

Private Types

enum  {
  S11 = 7, S12 = 12, S13 = 17, S14 = 22,
  S21 = 5, S22 = 9, S23 = 14, S24 = 20,
  S31 = 4, S32 = 11, S33 = 16, S34 = 23,
  S41 = 6, S42 = 10, S43 = 15, S44 = 21
}
 

Private Member Functions

void Transform (const unsigned char block[64])
 
void Encode (unsigned char *output, unsigned *input, unsigned len)
 
void Decode (unsigned *output, const unsigned char *input, unsigned len)
 

Private Attributes

unsigned state [4]
 
unsigned count [2]
 
unsigned char buffer [64]
 
unsigned char digest [16]
 

Detailed Description

Definition at line 89 of file enc_md5.cpp.

Member Enumeration Documentation

anonymous enum
private
Enumerator
S11 
S12 
S13 
S14 
S21 
S22 
S23 
S24 
S31 
S32 
S33 
S34 
S41 
S42 
S43 
S44 

Definition at line 98 of file enc_md5.cpp.

Constructor & Destructor Documentation

MD5Context::MD5Context ( Encryption::IV iv = NULL)
inline

Definition at line 231 of file enc_md5.cpp.

References md5_iv.

Member Function Documentation

void MD5Context::Decode ( unsigned *  output,
const unsigned char *  input,
unsigned  len 
)
inlineprivate

Definition at line 224 of file enc_md5.cpp.

Referenced by Transform().

void MD5Context::Encode ( unsigned char *  output,
unsigned *  input,
unsigned  len 
)
inlineprivate

Definition at line 210 of file enc_md5.cpp.

Referenced by Finalize().

void MD5Context::Finalize ( )
inlinevirtual

Implements Encryption::Context.

Definition at line 288 of file enc_md5.cpp.

References Encode(), PADDING, and Update().

Referenced by EMD5::OnEncrypt().

Encryption::Hash MD5Context::GetFinalizedHash ( )
inlinevirtual

Implements Encryption::Context.

Definition at line 312 of file enc_md5.cpp.

References digest.

Referenced by EMD5::OnEncrypt().

void MD5Context::Transform ( const unsigned char  block[64])
inlineprivate

Definition at line 120 of file enc_md5.cpp.

References Decode(), FF(), GG(), HH(), II(), S11, S12, S13, S14, S21, S22, S23, S24, S31, S32, S33, S34, S41, S42, S43, and S44.

Referenced by Update().

void MD5Context::Update ( const unsigned char *  input,
size_t  len 
)
inlinevirtual

Implements Encryption::Context.

Definition at line 253 of file enc_md5.cpp.

References Transform().

Referenced by Finalize(), and EMD5::OnEncrypt().

Field Documentation

unsigned char MD5Context::buffer[64]
private

Definition at line 93 of file enc_md5.cpp.

unsigned MD5Context::count[2]
private

Definition at line 92 of file enc_md5.cpp.

unsigned char MD5Context::digest[16]
private

Definition at line 94 of file enc_md5.cpp.

Referenced by GetFinalizedHash().

unsigned MD5Context::state[4]
private

Definition at line 91 of file enc_md5.cpp.


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