185 return CGSizeMake(resultWidth,resultHeight); |
185 return CGSizeMake(resultWidth,resultHeight); |
186 } |
186 } |
187 |
187 |
188 @implementation NSString (extra) |
188 @implementation NSString (extra) |
189 |
189 |
190 -(NSString *)getMD5hash { |
190 -(NSString *)MD5hash { |
191 const char *cStr = [self UTF8String]; |
191 const char *cStr = [self UTF8String]; |
192 unsigned char result[16]; |
192 unsigned char result[16]; |
193 CC_MD5( cStr, strlen(cStr), result ); |
193 CC_MD5( cStr, strlen(cStr), result ); |
194 return [NSString stringWithFormat: |
194 return [NSString stringWithFormat: |
195 @"%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X", |
195 @"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", |
196 result[0], result[1], result[2], result[3], result[4], result[5], |
196 result[0], result[1], result[2], result[3], result[4], result[5], |
197 result[6], result[7], result[8], result[9], result[10], result[11], |
197 result[6], result[7], result[8], result[9], result[10], result[11], |
198 result[12], result[13], result[14], result[15]]; |
198 result[12], result[13], result[14], result[15]]; |
199 } |
199 } |
200 |
200 |