Classes | Public Types | Public Member Functions

base::MD5 Class Reference

Contains methods for MD5-hashing from given input data. More...

#include <libppbase/base/MD5.h>

List of all members.

Classes

struct  md5_ctx
 Structure to save state of computation between the single steps. More...

Public Types

typedef unsigned int md5_uint32
 data type to use

Public Member Functions

 MD5 ()
 Constructor for building incremental hash.
 MD5 (const String &input)
 Hash a given input string.
void add (const void *buffer, size_t len)
 Add some bytes to the incremental hash.
void add (const char *buffer)
 Add some bytes to the incremental hash, the buffer must be 0-terminated.
void add (const String &str)
 Add some bytes to the incremental hash.
void finish ()
 Finish the incremental hash.
void get (unsigned char *outputbuf) const
 Serialize to (already allocated) output buffer. outputbuf must be able to hold 16 chars.
void get (unsigned *adata0, unsigned *adata1=NULL, unsigned *adata2=NULL, unsigned *adata3=NULL) const
 Serialize to 32 bit values.
void get (u_longlong_t *adata0, u_longlong_t *adata1=NULL) const
 Serialize to 64 bit values.
void getHexStr (char *buf) const
 Serializes to a hex string.
void getHexStr (String &str) const
 Serializes to a hex string.
void init ()
 Begin a new incremental hash.

Detailed Description

Contains methods for MD5-hashing from given input data.

Author:
Christoph Schwarz
Version:
$Id: MD5.h 21 2010-09-05 04:18:17Z cschwarz1 $

Member Function Documentation

void base::MD5::getHexStr ( char *  buf  )  const

Serializes to a hex string.

Parameters:
buf the buffer to serialize to, must be at least 33 bytes large
void base::MD5::getHexStr ( String str  )  const

Serializes to a hex string.

Parameters:
str the string to serialize to

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