标签:
1.对网络传输请求参数加密 下载操作文件名加密
+ (NSString *)md5:(NSString *)input
{
const char *cStr = [input UTF8String];
unsigned char digest[CC_MD5_DIGEST_LENGTH];
CC_MD5(cStr, (int32_t)strlen(cStr), digest);
NSMutableString *output = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH * 2];
for(int i = 0; i < CC_MD5_DIGEST_LENGTH; i++)
[output appendFormat:@"%02x", digest[i]];
return output;
}
标签:
原文地址:http://www.cnblogs.com/LVanswer/p/5575934.html