DUNE: Uniform Navigational Environment  2019.02.1
DUNE::Algorithms::MD5 Class Reference

Detailed Description

MD-5 Algorithm (RFC 1321).

Classes

struct  MD5_HANDLE
 

Public Member Functions

 MD5 (void)
 
 ~MD5 (void)
 
void reset (void)
 
void update (const uint8_t *data, int size)
 
void finalize (uint8_t *digest)
 

Static Public Member Functions

static void compute (const uint8_t *buffer, unsigned int len, uint8_t *digest)
 
static void compute (const char *path, uint8_t *digest)
 

Constructor & Destructor Documentation

DUNE::Algorithms::MD5::MD5 ( void  )

Constructor.

References reset().

DUNE::Algorithms::MD5::~MD5 ( void  )

Destructor.

Member Function Documentation

void DUNE::Algorithms::MD5::compute ( const uint8_t *  buffer,
unsigned int  len,
uint8_t *  digest 
)
static

Compute the MD5 hash sum of a given data buffer.

Parameters
bufferdata buffer.
lendata buffer length.
digestoutput MD5 digest (16 bytes long).
void DUNE::Algorithms::MD5::compute ( const char *  path,
uint8_t *  digest 
)
static

Compute the MD5 hash sum for a file.

Parameters
pathfile path.
digestoutput MD5 digest (16 bytes long).
void DUNE::Algorithms::MD5::finalize ( uint8_t *  digest)

Finalize MD5 hash and obtain digest.

Parameters
digestoutput digest (16 bytes long)

References DUNE::Algorithms::MD5::MD5_HANDLE::ctx.

void DUNE::Algorithms::MD5::reset ( void  )

Reset to an initial state.

References DUNE::Algorithms::MD5::MD5_HANDLE::ctx.

Referenced by MD5().

void DUNE::Algorithms::MD5::update ( const uint8_t *  data,
int  size 
)

Update MD5 hash with input data.

Parameters
datadata buffer
sizelength of data

References DUNE::Algorithms::MD5::MD5_HANDLE::ctx.

Collaboration diagram for DUNE::Algorithms::MD5:
Collaboration graph