I have some data I need to put into a file, however I want to ensure that the data remains intact. Either from corruption or from a user modifying the file.
Can someone point me in the right direction, of how to add a checksum to a file, read / check the file is correct?
You can use the
MD5hash, that’s the best option. Here is how to create aMD5hash fromNSString,NSDataor a File:http://iosdevelopertips.com/core-services/create-md5-hash-from-nsstring-nsdata-or-file.html