diff options
author | sanikoyes <sanikoyes@163.com> | 2014-04-06 21:52:47 +0800 |
---|---|---|
committer | sanikoyes <sanikoyes@163.com> | 2014-04-06 21:52:47 +0800 |
commit | 77a840e350668a9c80b1e63b9b73aac44221c53b (patch) | |
tree | 40d2115e639bdc72a61811ac4f2fb0f04ec8eb7f /core/ustring.cpp | |
parent | 14bbdcb139b35e6d206df1ab3176d34245b72329 (diff) | |
parent | ded365031ede27b7a6efef59bc886343f58d310b (diff) |
Merge branch 'master' into hotfix-android-unicode-ime-input
Diffstat (limited to 'core/ustring.cpp')
-rw-r--r-- | core/ustring.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index 2384ce5bd6..d119e341c3 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -31,6 +31,7 @@ #include "os/memory.h" #include "print_string.h" #include "math_funcs.h" +#include "io/md5.h" #include "ucaps.h" #include "color.h" #define MAX_DIGITS 6 @@ -2264,6 +2265,15 @@ uint64_t String::hash64() const { } +String String::md5_text() const { + + CharString cs=utf8(); + MD5_CTX ctx; + MD5Init(&ctx); + MD5Update(&ctx,(unsigned char*)cs.ptr(),cs.length()); + MD5Final(&ctx); + return String::md5(ctx.digest); +} String String::insert(int p_at_pos,String p_string) const { |