这是代码:
NSString *decryptResponseString = [AESCrypt decrypt128:responseString key:@"a16byteslongkey!"];
NSString *lisence = [NSString createLisence:self.serial withSalt:sha_salt];
NSLog(@"lisence: %@", lisence);
NSLog(@"decrypt: %@", decryptResponseString);
int a = [lisence isEqualToString:decryptResponseString]?1:0;
NSLog(@"%i", a);
这是日志:
2012-12-16 15:52:30.249 TextLabelButton[1430:11303] lisence: 3b27cde24235d08a5de5904a4
2012-12-16 15:52:30.250 TextLabelButton[1430:11303] decrypt: 3b27cde24235d08a5de5904a4
2012-12-16 15:52:30.250 TextLabelButton[ 1430:11303] 0
我不知道为什么当我使用[lisence isEqualToString:decryptResponseString]
or时结果总是“0” (lisence == decryptResponseString)
。