Merge pull request #8 from bcse/patch-1

Fix Objective-C implementation, it has different result comparing to others
This commit is contained in:
Kyle Banks 2017-03-23 06:57:08 -04:00 committed by GitHub
commit 2e562345ac

View File

@ -19,7 +19,7 @@
for(int i = 0; i < input.length; i++) { for(int i = 0; i < input.length; i++) {
unichar c = [input characterAtIndex:i]; unichar c = [input characterAtIndex:i];
c ^= key[i % sizeof(key)/sizeof(unichar)]; c ^= key[i % (sizeof(key)/sizeof(unichar))];
[output appendString:[NSString stringWithFormat:@"%C", c]]; [output appendString:[NSString stringWithFormat:@"%C", c]];
} }