A class that calculates an md5 digest from a data stream using the algorithm described by RFC 1321. More...
#include <md5.h>
Classes | |
struct | state_type |
< Holds the state of an md5 digest stream. Used by md5::digest_stream. More... | |
Public Member Functions | |
digest_stream () | |
Default constructor. More... | |
digest_stream (digest::state_type d, small_t n) | |
Constructor taking state() allowing digest calculation to be suspended and resumed. More... | |
void | add (const string_type &) |
Adds more message data. More... | |
void | close () |
Called after the last add(). More... | |
small_t | size () const |
Returns how many data bytes have been accumulated so far. More... | |
state_type | state () const |
Returns the current state. More... | |
A class that calculates an md5 digest from a data stream using the algorithm described by RFC 1321.
The implementation is layered on top of the block-oriented md5::digest by adding an element of buffering. The buffering allows incremental calculation of an md5 digest without requiring either the complete input string or precise 64-byte blocks.
md5::digest_stream::digest_stream | ( | digest::state_type | d, |
small_t | n | ||
) |
void md5::digest_stream::add | ( | const string_type & | s | ) |
void md5::digest_stream::close | ( | ) |
md5::small_t md5::digest_stream::size | ( | ) | const |
md5::digest_stream::state_type md5::digest_stream::state | ( | ) | const |
Returns the current state.
Only useful after close().
Definition at line 412 of file md5.cpp.
References md5::digest_stream::state_type::d, md5::digest_stream::state_type::n, and md5::digest_stream::state_type::s.