23 #ifndef VARIANT_TOPIC_TOOLS_MD5_SUM_H 24 #define VARIANT_TOPIC_TOOLS_MD5_SUM_H 26 #include <boost/array.hpp> 40 typedef boost::array<uint32_t, 4>
Digest;
44 MD5Sum(
const std::string& text = std::string());
64 void update(
const std::string& text);
72 void write(std::ostream& stream)
const;
85 typedef boost::array<uint32_t, 2>
Size;
89 typedef boost::array<uint32_t, 16>
Block;
122 void update(
const uint8_t* bytes,
size_t numBytes);
126 static void transform(
const Block& block, Digest& digest);
130 static uint32_t
rotateLeft(uint32_t value,
size_t numBits);
134 static void update(Digest& digest, Size& numDigestedBits, Block& buffer,
135 const uint8_t* bytes,
size_t numBytes);
139 static void finalize(Digest& digest, Size& numDigestedBits, Block& buffer);