I am working on an encryption tool, and I need to be able to encrypt the contents of any binary file whether it be text or sound. How can I extract the contents of the file and use that to encrypt. I already have my encryption set, but it is of no use if I have nothing to encrypt.
Your help is greatly appreciated
Thanks!
The simplest way, if you can afford loading the whole file into memory is:
Otherwise you can use NSFileHandle:
See also NSData Reference or NSFileHandle Reference