|typedef unsigned int||size_type|
Public Member Functions
|MD5 (const std::string &text)|
|void||update (const unsigned char *buf, size_type length)|
|void||update (const char *buf, size_type length)|
|MD5 &||finalize ()|
|std::string||hexdigest () const|
|void||print (std::ostream &os) const|
This class is computing the MD5 hash (or finger print) of a file or a block of bytes. It is not meant to be either fast or secure, but it is reliable enough to be used as a debug tool in understanding if two files are the same or not.
This code is derived from the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" and this is the license to copy and use coming with this code.
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved.
License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing this software or this function.
License is also granted to make and use derivative works provided that such works are identified as "derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this documentation and/or software.
The use is very simple and self examplaining.
|MD5::MD5||(||const std::string &||text||)|
|MD5 & MD5::finalize||(||)|
|void MD5::print||(||std::ostream &||os||)||const|
|void MD5::update||(||const char *||buf,|
|buf||An array of signed char|
|length||Length of the buffer|
|void MD5::update||(||const unsigned char *||buf,|