UNICORN - iOS
NSString+Crypto.h
1 //
2 // NSString+Crypto.h
3 //
4 // About
5 // -----
6 //
7 // CocoaCryptoHashing is a very simple and lightweight collection of MD5/SHA1
8 // functions for Cocoa (which sadly does not contain any of these by default). It
9 // provides two categories on both `NSString` and `NSData`. The header file is
10 // pretty well documented, so getting started should not be a problem.
11 //
12 // Requirements
13 // ------------
14 //
15 // You will need Cocoa (and more specifically, Foundation), in order to use
16 // this. OpenSSL is required as well, but since Mac OS X comes with it by
17 // default, this should not be a problem.
18 //
19 // Building
20 // --------
21 //
22 // Depending on the platform and the target, you may need different linker flags.
23 // On 10.5 and on the iPhone platform, `-lcrypto` should be enough; on 10.4 you
24 // may need to use both `-lcrypto` and `-lssl`.
25 //
26 // License
27 // -------
28 //
29 // CocoaCryptoHashing is licensed under the modified BSD license. This license is
30 // included in the COPYING file.
31 //
32 // Contact
33 // -------
34 //
35 // Any comments, questions, remarks, ... should be sent to
36 // <denis.defreyne@stoneship.org>.
37 //
38 
39 #import <Foundation/Foundation.h>
40 
42 
48 - (NSData *)md5Hash;
49 
55 - (NSString *)md5HexHash;
56 
62 - (NSData *)sha1Hash;
63 
69 - (NSString *)sha1HexHash;
70 
71 @end
NSData * md5Hash()
Definition: NSString+Crypto.m:10
NSData * sha1Hash()
Definition: NSString+Crypto.m:20
Definition: NSString+Crypto.h:41
NSString * md5HexHash()
Definition: NSString+Crypto.m:15
NSString * sha1HexHash()
Definition: NSString+Crypto.m:25