--- a/sources/mystring.cpp Thu Dec 11 16:17:35 2014 +0200 +++ b/sources/mystring.cpp Fri Dec 12 00:55:51 2014 +0200 @@ -32,6 +32,7 @@ #include "main.h" #include "mystring.h" #include "format.h" +#include "md5.h" // ------------------------------------------------------------------------------------------------- // @@ -477,3 +478,14 @@ ::sprintf (buf, "%f", a); return String (buf); } + +// ------------------------------------------------------------------------------------------------- +// +METHOD +String::md5() const -> String +{ + char checksum[33]; + CalculateMD5 (reinterpret_cast<const unsigned char*> (chars()), length(), checksum); + checksum[sizeof checksum - 1] = '\0'; + return String (checksum); +}