//1、给一个字符串进行MD5加密
NSString *passKey = @"myapp";
passKey = [passKey md5String];
//2、对第一步中得到的MD5 和password进行HMAC加密
NSString *passWord = [pwd hmacMD5StringWithKey:passKey];
//3、获取系统时间 拼接到第二部中的结果中
NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"server的地址获取server的时间"]];
NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:data options:0 error:NULL];
NSString *time = dic[@"key"];
passWord = [passWord stringByAppendingString:time];
//4、对第三步得到的结果 和第一步进行HMAC加密
passWord = [passWord hmacMD5StringWithKey:passKey];
return passWord;