Take the 2-minute tour ×

I am calling a web services in an iOS application which returns a URL to download a zip file of a book and its MD5 checksum. I would like to check the integrity of the file by calculating its MD5 checksum for comparison.

  1. How can I calculate it? The file is a .zip file and it is stored in Documents.
  2. The second question is: I would like to prevent files, such as books, htmpl files, from being backed up to iCloud and iTunes, I saw that there is a solution with iOS 5.1 and later but I would like to put my application to users with iOS 5.0. Is there a solution for this? Can I put the books downloaded in Cashes?
share|improve this question
Please only ask one question per page. That helps keep the answers on-topic. –  the Tin Man Jul 30 '12 at 16:25
add comment

1 Answer

up vote 0 down vote accepted

MD5 is available on the iPhone and can be added as an extension for NSString and NSData like below. You can also use this same method with OSX.

MD5 algorithm in Objective C

share|improve this answer
add comment

Your Answer


