Main MRPT website > C++ reference for MRPT 1.5.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 66 of file md5.cpp.

Public Types

typedef unsigned int size_type
 

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 }
 
typedef unsigned char uint1
 
typedef unsigned int uint4
 

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

typedef unsigned int MD5::size_type

Definition at line 69 of file md5.cpp.

◆ uint1

typedef unsigned char MD5::uint1
private

Definition at line 81 of file md5.cpp.

◆ uint4

typedef unsigned int MD5::uint4
private

Definition at line 82 of file md5.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
blocksize 

Definition at line 83 of file md5.cpp.

Constructor & Destructor Documentation

◆ MD5() [1/2]

MD5::MD5 ( )

Definition at line 172 of file md5.cpp.

◆ MD5() [2/2]

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

Definition at line 180 of file md5.cpp.

Member Function Documentation

◆ decode()

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

Definition at line 206 of file md5.cpp.

◆ encode()

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

Definition at line 217 of file md5.cpp.

◆ F()

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

Definition at line 130 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 153 of file md5.cpp.

◆ finalize()

MD5 & MD5::finalize ( )

Definition at line 367 of file md5.cpp.

◆ G()

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

Definition at line 134 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 157 of file md5.cpp.

◆ H()

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

Definition at line 138 of file md5.cpp.

◆ hexdigest()

std::string MD5::hexdigest ( ) const

Definition at line 404 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 161 of file md5.cpp.

◆ I()

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

Definition at line 142 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 165 of file md5.cpp.

◆ init()

void MD5::init ( )
private

Definition at line 189 of file md5.cpp.

◆ rotate_left()

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

Definition at line 147 of file md5.cpp.

◆ transform()

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

Definition at line 230 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 419 of file md5.cpp.

Member Data Documentation

◆ buffer

uint1 MD5::buffer[blocksize]
private

Definition at line 90 of file md5.cpp.

◆ count

uint4 MD5::count[2]
private

Definition at line 91 of file md5.cpp.

◆ digest

uint1 MD5::digest[16]
private

Definition at line 93 of file md5.cpp.

◆ finalized

bool MD5::finalized
private

Definition at line 89 of file md5.cpp.

◆ state

uint4 MD5::state[4]
private

Definition at line 92 of file md5.cpp.




Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020