#include <md5.h>
Inheritance diagram for MD5:


Usage flow: MD5() // construct new MD5 object add() // call as many times as necessary to process data final() // finalize message digest computation result() // get 128-bit message digest value Recommendations for strict FIPS 140-1 compliance: MD5 is not a FIPS approved algorithm, so the MD5 class should *NOT* be used.
Sample code illustrating the use of this class appears in the Cookbook section Using the Message Digest Functions.
Public Member Functions | |
| MD5 (int v=0) | |
| Constructor. Calls clear(). | |
| ~MD5 () | |
| Destructor. Calls clear(). | |
| int | add (int count, const char *buf) |
| Update the message digest computation with the contents of the input buffer. | |
| int | final (void) |
| Finalize the message digest computation. | |
| const char * | result () const |
| Get a pointer to the 16-byte message digest value. | |
| int | length () const |
| Get the length of an MD5 value in bytes. | |
| int | blocksize () const |
| Get the block size of the MD5 algorithm in bytes. | |
| template<class T> | |
| T | to () const |
| Convert the message digest to type T. | |
| str | tostr () const |
| Convert the message digest to a str:. | |
| void | clear (void) |
| Clear MD5 object. | |
| MD5 | ( | int | v = 0 |
) | [inline] |
Constructor. Calls clear().
| v | unused; facilitates the use of templates elsewhere. |
| int add | ( | int | count, | |
| const char * | buf | |||
| ) |
Update the message digest computation with the contents of the input buffer.
| count | length of input buffer in bytes | |
| buf | pointer to input buffer |
| int blocksize | ( | ) | const [inline] |
Get the block size of the MD5 algorithm in bytes.
| void clear | ( | void | ) |
Clear MD5 object.
| int final | ( | void | ) |
Finalize the message digest computation.
| int length | ( | ) | const [inline] |
Get the length of an MD5 value in bytes.
| const char* result | ( | ) | const |
Get a pointer to the 16-byte message digest value.
| T to | ( | ) | const [inline] |
Convert the message digest to type T.
| str tostr | ( | ) | const |
Convert the message digest to a str:.
| ISC Cryptographic Development Kit - User's Guide | |
| Questions? E-mail ISC technical support | |
| Copyright© 2002-2006 Information Security Corp. All rights reserved. |