• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [OBJC Newbie] - MD5 Digest
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OBJC Newbie] - MD5 Digest


  • Subject: Re: [OBJC Newbie] - MD5 Digest
  • From: Denis Defreyne <email@hidden>
  • Date: Wed, 31 May 2006 16:26:29 +0200

On 31 May 2006, at 16:13, Graham wrote:

I am in the rather arduous process of learning OBJC and converting my existing Cocoa-Java app to OBJC.
I need a class/framework to create an MD5 digest of a String.
In Java there is a MessageDigest class to do this.
What do I use in OBJC?

The Cocoa frameworks do not include a method that creates the MD5 digest of a NSString or a NSData. However, you can easily write your own: check the man page for md5(3). All you need is the MD5() function if I'm not mistaken.


Also, "the MD5 digest of a string" is rather ambiguous. It depends on the encoding used. I'm assuming you mean "the MD5 digest of the UTF-8 representation of a string."

If you're lazy, you can use CCH, a set of two categories that add MD5 and SHA-1 support to both NSString and NSData. You can find it at <http://stoneship.org/software/#cocoa-crypto-hashing>.

Regards,

Denis Defreyne

--
mail: email@hidden
web: http://stoneship.org/


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >[OBJC Newbie] - MD5 Digest (From: Graham <email@hidden>)

  • Prev by Date: Re: Binding popup contents difficulties [REVISITED]
  • Next by Date: Re: Problem subclassing a NSCell in a NSTableView (solution)
  • Previous by thread: [OBJC Newbie] - MD5 Digest
  • Next by thread: Re: [OBJC Newbie] - MD5 Digest
  • Index(es):
    • Date
    • Thread