Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Public Types | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends
MD5 Class Reference

Detailed Description

Definition at line 67 of file md5.cpp.

Public Types

using size_type = uint32_t
 

Public Member Functions

 MD5 ()
 
 MD5 (const std::string &text)
 
void update (const unsigned char *buf, size_type length)
 
void update (const char *buf, size_type length)
 
MD5finalize ()
 
std::string hexdigest () const
 

Private Types

enum  { blocksize = 64 }
 
using uint1 = unsigned char
 
using uint4 = unsigned int
 

Private Member Functions

void init ()
 
void transform (const uint1 block[blocksize])
 

Static Private Member Functions

static void decode (uint4 output[], const uint1 input[], size_type len)
 
static void encode (uint1 output[], const uint4 input[], size_type len)
 
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 uint4 rotate_left (uint4 x, int n)
 
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

bool finalized
 
uint1 buffer [blocksize]
 
uint4 count [2]
 
uint4 state [4]
 
uint1 digest [16]
 

Friends

std::ostream & operator<< (std::ostream &, MD5 md5)
 

Member Typedef Documentation

◆ size_type

Definition at line 70 of file md5.cpp.

◆ uint1

using MD5::uint1 = unsigned char
private

Definition at line 82 of file md5.cpp.

◆ uint4

using MD5::uint4 = unsigned int
private

Definition at line 83 of file md5.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
blocksize 

Definition at line 84 of file md5.cpp.

Constructor & Destructor Documentation

◆ MD5() [1/2]

MD5::MD5 ( )

Definition at line 183 of file md5.cpp.

◆ MD5() [2/2]

MD5::MD5 ( const std::string text)

Definition at line 187 of file md5.cpp.

Member Function Documentation

◆ decode()

void MD5::decode ( uint4  output[],
const uint1  input[],
size_type  len 
)
staticprivate

Definition at line 214 of file md5.cpp.

◆ encode()

void MD5::encode ( uint1  output[],
const uint4  input[],
size_type  len 
)
staticprivate

Definition at line 226 of file md5.cpp.

◆ F()

MD5::uint4 MD5::F ( uint4  x,
uint4  y,
uint4  z 
)
inlinestaticprivate

Definition at line 136 of file md5.cpp.

◆ FF()

void MD5::FF ( uint4 a,
uint4  b,
uint4  c,
uint4  d,
uint4  x,
uint4  s,
uint4  ac 
)
inlinestaticprivate

Definition at line 156 of file md5.cpp.

◆ finalize()

MD5 & MD5::finalize ( )

Definition at line 376 of file md5.cpp.

◆ G()

MD5::uint4 MD5::G ( uint4  x,
uint4  y,
uint4  z 
)
inlinestaticprivate

Definition at line 141 of file md5.cpp.

◆ GG()

void MD5::GG ( uint4 a,
uint4  b,
uint4  c,
uint4  d,
uint4  x,
uint4  s,
uint4  ac 
)
inlinestaticprivate

Definition at line 162 of file md5.cpp.

References G.

◆ H()

MD5::uint4 MD5::H ( uint4  x,
uint4  y,
uint4  z 
)
inlinestaticprivate

Definition at line 146 of file md5.cpp.

◆ hexdigest()

std::string MD5::hexdigest ( ) const

Definition at line 413 of file md5.cpp.

References mrpt::system::os::sprintf().

◆ HH()

void MD5::HH ( uint4 a,
uint4  b,
uint4  c,
uint4  d,
uint4  x,
uint4  s,
uint4  ac 
)
inlinestaticprivate

Definition at line 168 of file md5.cpp.

◆ I()

MD5::uint4 MD5::I ( uint4  x,
uint4  y,
uint4  z 
)
inlinestaticprivate

Definition at line 147 of file md5.cpp.

◆ II()

void MD5::II ( uint4 a,
uint4  b,
uint4  c,
uint4  d,
uint4  x,
uint4  s,
uint4  ac 
)
inlinestaticprivate

Definition at line 174 of file md5.cpp.

◆ init()

void MD5::init ( )
private

Definition at line 196 of file md5.cpp.

◆ rotate_left()

MD5::uint4 MD5::rotate_left ( uint4  x,
int  n 
)
inlinestaticprivate

Definition at line 149 of file md5.cpp.

◆ transform()

void MD5::transform ( const uint1  block[blocksize])
private

Definition at line 240 of file md5.cpp.

References S11, S12, S13, S14, S21, S22, S23, S24, S31, S32, S33, S34, S41, S42, S43, and S44.

◆ update() [1/2]

void MD5::update ( const unsigned char *  buf,
size_type  length 
)

◆ update() [2/2]

void MD5::update ( const char *  buf,
size_type  length 
)

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
MD5  md5 
)
friend

Definition at line 426 of file md5.cpp.

Member Data Documentation

◆ buffer

uint1 MD5::buffer[blocksize]
private

Definition at line 94 of file md5.cpp.

◆ count

uint4 MD5::count[2]
private

Definition at line 95 of file md5.cpp.

◆ digest

uint1 MD5::digest[16]
private

Definition at line 97 of file md5.cpp.

◆ finalized

bool MD5::finalized
private

Definition at line 93 of file md5.cpp.

◆ state

uint4 MD5::state[4]
private

Definition at line 96 of file md5.cpp.




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at lun oct 28 00:14:14 CET 2019