用MD5加密
NSString*password = [NSString stringWithFormat:@"%@",_passText.text];//密码
NSString*MD5PassWord = [JJMD5 md5HexDigest:password];//加密处理
上传的时候就传md5password
#import"JJMD5.h"
#import
@implementationJJMD5
#pragma mark MD5加密
+ (NSString*)md5HexDigest:(NSString*)input
{
constchar*myPasswd = [inputUTF8String];
unsignedcharmdc[16];
CC_MD5(myPasswd, (CC_LONG)strlen(myPasswd), mdc);
NSMutableString*md5String = [NSMutableStringstring];
for(inti =0; i<16; i++) {
//全大写为X,小写为x
[md5StringappendFormat:@"%02X",mdc[i]];
}
returnmd5String;
}
@end