I want to encrypt hash some strings with MD5 in my Mac application.
I Googled about it, but it keeps throwing me examples on how to do it with iPhone apps, like MD5 algorithm in Objective C or Using MD5 hash on a string in cocoa?…
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
MD5 is not encryption!. Please see http://en.wikipedia.org/wiki/Cryptographic_hash_function
All of your examples do in fact work on OS X. CommonCrypto is part of libSystem. For a more complete example, I suggest this CocoaWithLove tutorial (and sample code!)
http://cocoawithlove.com/2009/07/hashvalue-object-for-holding-md5-and.html