Encryption and security are topics that I’ve brought up a number of times most recently when I mentioned the CryptoCoding library that allows easy encryption of any NSCoding compatible object.
Here’s another great encryption library from Christoph Jeromilov called NSHash that provides extremely easy to use categories for generating MD5, SHA1, or SHA256 hashes from NSData and NSString objects.
Here’s an example showing how easy it is to encrypt an NSString object from the readme:
NSLog(@"MD5: %@", [string MD5]);
NSLog(@"SHA1: %@", [string SHA1]);
NSLog(@"SHA256: %@", [string SHA256]);
You can find NSHash on Github here.
There’s a number of great encryption libraries out there, but if you’re looking for the easiest solution to create hashes from NSString or NSData objects this is it.
Original article: Dead Simple Library For Creating MD5, SHA1, And SHA256 Hashes From NSData and NSString Objects
©2012 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.





