0

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?
the Tin Man
  • 158,662
  • 42
  • 215
  • 303
samir
  • 4,501
  • 6
  • 49
  • 76

1 Answers1

0

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

Community
  • 1
  • 1
nycynik
  • 7,371
  • 8
  • 62
  • 87