Sirikata
|
#include <Md5.hpp>
Public Member Functions | |
MD5 () | |
void | update (unsigned char *input, unsigned int input_length) |
void | update (std::istream &stream) |
void | update (std::ifstream &stream) |
void | finalize () |
MD5 (unsigned char *string) | |
MD5 (unsigned char *string, unsigned int input_length) | |
MD5 (std::istream &stream) | |
MD5 (std::ifstream &stream) | |
unsigned char * | raw_digest () |
char * | hex_digest () |
Private Types | |
typedef unsigned int | uint4 |
typedef unsigned short int | uint2 |
typedef unsigned char | uint1 |
Private Member Functions | |
void | init () |
void | transform (uint1 *buffer) |
Static Private Member Functions | |
static void | encode (uint1 *dest, uint4 *src, uint4 length) |
static void | decode (uint4 *dest, uint1 *src, uint4 length) |
static void | memcpy (uint1 *dest, uint1 *src, uint4 length) |
static void | memset (uint1 *start, uint1 val, uint4 length) |
static uint4 | rotate_left (uint4 x, uint4 n) |
static uint4 | F (uint4 x, uint4 y, uint4 z) |
static uint4 | G (uint4 x, uint4 y, uint4 z) |
static uint4 | H (uint4 x, uint4 y, uint4 z) |
static uint4 | I (uint4 x, uint4 y, uint4 z) |
static void | FF (uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac) |
static void | GG (uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac) |
static void | HH (uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac) |
static void | II (uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac) |
Private Attributes | |
uint4 | state [4] |
uint4 | count [2] |
uint1 | buffer [64] |
uint1 | digest [16] |
uint1 | finalized |
char | _hex_digest [33] |
Friends | |
std::ostream & | operator<< (std::ostream &, MD5 context) |
typedef unsigned char Sirikata::MD5::uint1 [private] |
typedef unsigned short int Sirikata::MD5::uint2 [private] |
typedef unsigned int Sirikata::MD5::uint4 [private] |
Sirikata::MD5::MD5 | ( | ) |
References init().
Sirikata::MD5::MD5 | ( | unsigned char * | string | ) |
References finalize(), init(), and update().
Sirikata::MD5::MD5 | ( | unsigned char * | string, |
unsigned int | input_length | ||
) |
References finalize(), init(), and update().
Sirikata::MD5::MD5 | ( | std::istream & | stream | ) |
References finalize(), init(), and update().
Sirikata::MD5::MD5 | ( | std::ifstream & | stream | ) |
References finalize(), init(), and update().
Referenced by transform().
Referenced by finalize().
Referenced by FF().
void Sirikata::MD5::FF | ( | uint4 & | a, |
uint4 | b, | ||
uint4 | c, | ||
uint4 | d, | ||
uint4 | x, | ||
uint4 | s, | ||
uint4 | ac | ||
) | [inline, static, private] |
References F(), and rotate_left().
Referenced by transform().
void Sirikata::MD5::finalize | ( | ) |
Referenced by GG().
void Sirikata::MD5::GG | ( | uint4 & | a, |
uint4 | b, | ||
uint4 | c, | ||
uint4 | d, | ||
uint4 | x, | ||
uint4 | s, | ||
uint4 | ac | ||
) | [inline, static, private] |
References G(), and rotate_left().
Referenced by transform().
Referenced by HH().
char * Sirikata::MD5::hex_digest | ( | ) |
References _hex_digest, digest, and finalized.
Referenced by Sirikata::operator<<().
void Sirikata::MD5::HH | ( | uint4 & | a, |
uint4 | b, | ||
uint4 | c, | ||
uint4 | d, | ||
uint4 | x, | ||
uint4 | s, | ||
uint4 | ac | ||
) | [inline, static, private] |
References H(), and rotate_left().
Referenced by transform().
Referenced by II().
void Sirikata::MD5::II | ( | uint4 & | a, |
uint4 | b, | ||
uint4 | c, | ||
uint4 | d, | ||
uint4 | x, | ||
uint4 | s, | ||
uint4 | ac | ||
) | [inline, static, private] |
References I(), and rotate_left().
Referenced by transform().
Referenced by update().
Referenced by finalize(), and transform().
void Sirikata::MD5::transform | ( | uint1 * | buffer | ) | [private] |
void Sirikata::MD5::update | ( | unsigned char * | input, |
unsigned int | input_length | ||
) |
References buffer, count, finalized, memcpy(), and transform().
Referenced by finalize(), MD5(), and update().
std::ostream& operator<< | ( | std::ostream & | stream, |
MD5 | context | ||
) | [friend] |
char Sirikata::MD5::_hex_digest[33] [private] |
Referenced by hex_digest().
uint1 Sirikata::MD5::buffer[64] [private] |
Referenced by finalize(), and update().
uint4 Sirikata::MD5::count[2] [private] |
Referenced by finalize(), init(), and update().
uint1 Sirikata::MD5::digest[16] [private] |
Referenced by finalize(), hex_digest(), and raw_digest().
uint1 Sirikata::MD5::finalized [private] |
Referenced by finalize(), hex_digest(), init(), raw_digest(), transform(), and update().
uint4 Sirikata::MD5::state[4] [private] |
Referenced by finalize(), init(), and transform().