R ruhi macrumors member Original poster 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 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: