*字符串异或加密 * * @param oldStr 被加密的字符串 * @param x 字符偏移量 * * @return 加密后的字符串 */ - (NSString *)getCharArrayUsingString:(NSString *)oldstr withCharOffset:(int)x { if (...
* 字符串异或加密
* @param oldStr 被加密的字符串
* @param x 字符偏移量
* @return 加密后的字符串
- (NSString *)getCharArrayUsingString:(NSString *)oldstr withCharOffset:(int)x
{
if (nil == oldstr || [@"" isEqualToString:oldstr]) {
return @"";
}
unichar *charArray = malloc(sizeof(unichar) * (oldstr.length + 1));
int nCount = (int)oldstr.length;
for(int i = 0; i