I am attempting to encrypt/decrypt a plain text file in my text editor. encrypting seems to work fine, but the decrypting does not work, the text comes up encrypted. I am ce
Why not use the built-in encryption algorithms? Here's an NSData+AES i wrote which uses CCCrypt with a 256it key for AES256 encryption.
You can use it like:
NSData *data = [[NSData dataWithContentsOfFile:@"/etc/passwd"]
encryptWithString:@"mykey"];
and decrypt it with:
NSData *file = [data decryptWithString:@"mykey"];
DISCLAIMER: There no guarantee my NSData+AES is bug-free :) It's fairly new. I welcome code reviews.