This commit is contained in:
Damiano Galassi committed 2014-06-29 14:28:58 +02:00
1 parent 30e506b990
commit c0b04daa6e
2 files changed
+4 -5

No files matched your search

+1 -1
View File
@@ -121,7 +121,7 @@
+ (NSString *) md5String:(NSString *) s {
const char *cStr = [s UTF8String];
unsigned char result[CC_MD5_DIGEST_LENGTH];
CC_MD5(cStr, strlen(cStr), result);
CC_MD5(cStr, (CC_LONG)strlen(cStr), result);
NSMutableString *r = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH * 2];
for(int i = 0; i < CC_MD5_DIGEST_LENGTH; ++i) {
[r appendFormat:@"%02x", result[i]];