![]() |
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/checksum/MD5.h>
Inheritance diagram for MD5:Public Types | |
| typedef unsigned char | digest_t[16] |
Public Member Functions | |
| MD5 (void) | |
| virtual | ~MD5 (void) |
| void | digest (digest_t tab) |
| void | print (io::Output &out) |
| void | put (const void *buffer, t::uint32 length) |
| void | put (const cstring &str) |
| void | put (const string &str) |
| void | put (io::InStream &in) |
| void | put (io::InStream &in, int length) |
| MD5 & | operator<< (const char *str) |
| MD5 & | operator<< (const CString &str) |
| MD5 & | operator<< (const String &str) |
| template<class T > | |
| MD5 & | operator<< (const T &value) |
| virtual int | write (const char *buffer, int size) |
| virtual int | flush (void) |
| virtual cstring | lastErrorMessage (void) |
Public Member Functions inherited from OutStream | |
| virtual | ~OutStream (void) |
| virtual int | write (char byte) |
| virtual bool | supportsANSI () const |
Additional Inherited Members | |
Static Public Attributes inherited from OutStream | |
| static OutStream & | null = _null |
Apply the MD5 algorithm (http://fr.wikipedia.org/wiki/MD5) to compute a checksum.
Data are checksummed calling any one of the put() methods (or using the overloaded operator <<). When all data has been checksummed, the checksum value is returned by digest().
| typedef unsigned char digest_t[16] |
|
virtual |
Cause the current stream to dump its buffer to the medium.
Implements OutStream.
Return a message for the last error.
Reimplemented from OutStream.
|
inline |
References MD5::put(), and elm::str().
References MD5::put(), and elm::str().
References MD5::put(), and elm::str().
|
inline |
References MD5::put().
| void print | ( | io::Output & | out | ) |
Print the MD5 digest as an hexadecimal value.
References elm::io::hex(), elm::io::pad(), elm::io::right(), and elm::io::width().
Referenced by elm::checksum::operator<<().
Put a C string in the checksum.
| str | C string to put in. |
References String::chars(), String::length(), MD5::put(), and elm::str().
Put a string in the checksum.
| str | String to put in. |
References String::length(), MD5::put(), and elm::str().
Put a data block in the checksum.
| block | Block address. |
| length | Block length. |
References elm::min().
Referenced by MD5::operator<<(), MD5::put(), and MD5::write().
| void put | ( | io::InStream & | in | ) |
Put an input stream in the buffer. Read to the end of the stream.
| in | Input stream to read. |
| io::IOException | If there is an error during stream read. |
| void put | ( | io::InStream & | in, |
| int | length | ||
| ) |
Put at most length bytes from the given stream to compute the MD5 checksum.
| in | Input stream to read. |
| length | Maximum number of bytes to read. |
| io::IOException | If there is an error during stream read. |
References elm::min().
|
virtual |
This is the main method of an output stream: the given buffer is put on the stream.
| buffer | Byte buffer to write. |
| size | Size of the byte buffer. |
Implements OutStream.
References MD5::put().