9:e7a09ceb4505 | 10:3874575d924d |
---|---|
30 | 30 |
31 #include <cstring> | 31 #include <cstring> |
32 #include "main.h" | 32 #include "main.h" |
33 #include "mystring.h" | 33 #include "mystring.h" |
34 #include "format.h" | 34 #include "format.h" |
35 #include "md5.h" | |
35 | 36 |
36 // ------------------------------------------------------------------------------------------------- | 37 // ------------------------------------------------------------------------------------------------- |
37 // | 38 // |
38 METHOD | 39 METHOD |
39 String::compare (const String& other) const -> int | 40 String::compare (const String& other) const -> int |
475 { | 476 { |
476 char buf[64]; | 477 char buf[64]; |
477 ::sprintf (buf, "%f", a); | 478 ::sprintf (buf, "%f", a); |
478 return String (buf); | 479 return String (buf); |
479 } | 480 } |
481 | |
482 // ------------------------------------------------------------------------------------------------- | |
483 // | |
484 METHOD | |
485 String::md5() const -> String | |
486 { | |
487 char checksum[33]; | |
488 CalculateMD5 (reinterpret_cast<const unsigned char*> (chars()), length(), checksum); | |
489 checksum[sizeof checksum - 1] = '\0'; | |
490 return String (checksum); | |
491 } |