COPASI API  4.40.278
Cmd5 Class Reference

#include <Cmd5.h>

Static Public Member Functions

static std::string digest (std::istream &message)
 

Private Types

typedef unsigned short int uint2
 

Private Member Functions

 Cmd5 (std::istream &message)
 
void finalize ()
 
void init ()
 
void transform (unsigned char *buffer)
 
void update (std::istream &stream)
 
void update (unsigned char *input, unsigned C_INT32 input_length)
 

Static Private Member Functions

static void decode (unsigned C_INT32 *dest, unsigned char *src, unsigned C_INT32 length)
 
static void encode (unsigned char *dest, unsigned C_INT32 *src, unsigned C_INT32 length)
 
static unsigned C_INT32 F (unsigned C_INT32 x, unsigned C_INT32 y, unsigned C_INT32 z)
 
static void FF (unsigned C_INT32 &a, unsigned C_INT32 b, unsigned C_INT32 c, unsigned C_INT32 d, unsigned C_INT32 x, unsigned C_INT32 s, unsigned C_INT32 ac)
 
static unsigned C_INT32 G (unsigned C_INT32 x, unsigned C_INT32 y, unsigned C_INT32 z)
 
static void GG (unsigned C_INT32 &a, unsigned C_INT32 b, unsigned C_INT32 c, unsigned C_INT32 d, unsigned C_INT32 x, unsigned C_INT32 s, unsigned C_INT32 ac)
 
static unsigned C_INT32 H (unsigned C_INT32 x, unsigned C_INT32 y, unsigned C_INT32 z)
 
static void HH (unsigned C_INT32 &a, unsigned C_INT32 b, unsigned C_INT32 c, unsigned C_INT32 d, unsigned C_INT32 x, unsigned C_INT32 s, unsigned C_INT32 ac)
 
static unsigned C_INT32 I (unsigned C_INT32 x, unsigned C_INT32 y, unsigned C_INT32 z)
 
static void II (unsigned C_INT32 &a, unsigned C_INT32 b, unsigned C_INT32 c, unsigned C_INT32 d, unsigned C_INT32 x, unsigned C_INT32 s, unsigned C_INT32 ac)
 
static unsigned C_INT32 rotate_left (unsigned C_INT32 x, unsigned C_INT32 n)
 

Private Attributes

unsigned char mBuffer [64]
 
unsigned C_INT32 mCount [2]
 
unsigned char mDigest [16]
 
bool mFinalized
 
unsigned C_INT32 mState [4]
 

Member Typedef Documentation

◆ uint2

typedef unsigned short int Cmd5::uint2
private

Constructor & Destructor Documentation

◆ Cmd5()

Cmd5::Cmd5 ( std::istream &  message)
private

References finalize(), init(), and update().

Member Function Documentation

◆ decode()

void Cmd5::decode ( unsigned C_INT32 dest,
unsigned char *  src,
unsigned C_INT32  length 
)
staticprivate

References C_INT32.

Referenced by transform().

◆ digest()

std::string Cmd5::digest ( std::istream &  message)
static

References mDigest, and mFinalized.

Referenced by CData::hash().

◆ encode()

void Cmd5::encode ( unsigned char *  dest,
unsigned C_INT32 src,
unsigned C_INT32  length 
)
staticprivate

Referenced by finalize().

◆ F()

unsigned C_INT32 Cmd5::F ( unsigned C_INT32  x,
unsigned C_INT32  y,
unsigned C_INT32  z 
)
inlinestaticprivate

Referenced by FF().

◆ FF()

void Cmd5::FF ( unsigned C_INT32 a,
unsigned C_INT32  b,
unsigned C_INT32  c,
unsigned C_INT32  d,
unsigned C_INT32  x,
unsigned C_INT32  s,
unsigned C_INT32  ac 
)
inlinestaticprivate

References F(), and rotate_left().

Referenced by transform().

◆ finalize()

void Cmd5::finalize ( void  )
private

References C_INT32, encode(), mBuffer, mCount, mDigest, mFinalized, mState, and update().

Referenced by Cmd5().

◆ G()

unsigned C_INT32 Cmd5::G ( unsigned C_INT32  x,
unsigned C_INT32  y,
unsigned C_INT32  z 
)
inlinestaticprivate

Referenced by GG().

◆ GG()

void Cmd5::GG ( unsigned C_INT32 a,
unsigned C_INT32  b,
unsigned C_INT32  c,
unsigned C_INT32  d,
unsigned C_INT32  x,
unsigned C_INT32  s,
unsigned C_INT32  ac 
)
inlinestaticprivate

References G(), and rotate_left().

Referenced by transform().

◆ H()

unsigned C_INT32 Cmd5::H ( unsigned C_INT32  x,
unsigned C_INT32  y,
unsigned C_INT32  z 
)
inlinestaticprivate

Referenced by HH().

◆ HH()

void Cmd5::HH ( unsigned C_INT32 a,
unsigned C_INT32  b,
unsigned C_INT32  c,
unsigned C_INT32  d,
unsigned C_INT32  x,
unsigned C_INT32  s,
unsigned C_INT32  ac 
)
inlinestaticprivate

References H(), and rotate_left().

Referenced by transform().

◆ I()

unsigned C_INT32 Cmd5::I ( unsigned C_INT32  x,
unsigned C_INT32  y,
unsigned C_INT32  z 
)
inlinestaticprivate

Referenced by II().

◆ II()

void Cmd5::II ( unsigned C_INT32 a,
unsigned C_INT32  b,
unsigned C_INT32  c,
unsigned C_INT32  d,
unsigned C_INT32  x,
unsigned C_INT32  s,
unsigned C_INT32  ac 
)
inlinestaticprivate

References I(), and rotate_left().

Referenced by transform().

◆ init()

void Cmd5::init ( )
private

References mCount, mFinalized, and mState.

Referenced by Cmd5().

◆ rotate_left()

unsigned C_INT32 Cmd5::rotate_left ( unsigned C_INT32  x,
unsigned C_INT32  n 
)
inlinestaticprivate

Referenced by FF(), GG(), HH(), and II().

◆ transform()

void Cmd5::transform ( unsigned char *  buffer)
private

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

Referenced by update().

◆ update() [1/2]

void Cmd5::update ( std::istream &  stream)
private

Referenced by Cmd5(), and finalize().

◆ update() [2/2]

void Cmd5::update ( unsigned char *  input,
unsigned C_INT32  input_length 
)
private

Member Data Documentation

◆ mBuffer

unsigned char Cmd5::mBuffer[64]
private

Referenced by finalize(), and update().

◆ mCount

unsigned C_INT32 Cmd5::mCount[2]
private

Referenced by finalize(), init(), and update().

◆ mDigest

unsigned char Cmd5::mDigest[16]
private

Referenced by digest(), and finalize().

◆ mFinalized

bool Cmd5::mFinalized
private

Referenced by digest(), finalize(), init(), transform(), and update().

◆ mState

unsigned C_INT32 Cmd5::mState[4]
private

Referenced by finalize(), init(), and transform().


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