R ruhi macrumors member Original poster Jun 17, 2009 70 0 Dec 29, 2009 #1 Hello, I am looking for some help in encrypting and NSString object and decrypting back to original NSString by using some simple algorithm like XOR Encryption. Please provide me with some help. Thanks, Ruhi
Hello, I am looking for some help in encrypting and NSString object and decrypting back to original NSString by using some simple algorithm like XOR Encryption. Please provide me with some help. Thanks, Ruhi
D Detrius macrumors 68000 Sep 10, 2008 1,623 19 Apex, NC Dec 30, 2009 #2 First, you have to actually get accessible binary data. http://developer.apple.com/mac/libr...tml#//apple_ref/occ/instm/NSString/UTF8String In C, binary xor is done with "^" http://www.fredosaurus.com/notes-cpp/expressions/bitops.html When you're done, you go back to an NSString: http://developer.apple.com/mac/libr...le_ref/occ/clm/NSString/stringWithUTF8String:
First, you have to actually get accessible binary data. http://developer.apple.com/mac/libr...tml#//apple_ref/occ/instm/NSString/UTF8String In C, binary xor is done with "^" http://www.fredosaurus.com/notes-cpp/expressions/bitops.html When you're done, you go back to an NSString: http://developer.apple.com/mac/libr...le_ref/occ/clm/NSString/stringWithUTF8String: