iOS 字符串MD5加密


//引入头文件
#import 


-(NSString *)md5HexDigest:(NSString *)input{
    const char *str = [input UTF8String];
    unsigned char result[CC_MD5_DIGEST_LENGTH];
    CC_MD5(str, (CC_LONG)strlen(str), result);
    NSMutableString *ret = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH];
    
    for(int i = 0; i

你可能感兴趣的:(iOS 字符串MD5加密)