• 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: MD5 Checksum of a file with CommonDigest.h
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MD5 Checksum of a file with CommonDigest.h


  • Subject: Re: MD5 Checksum of a file with CommonDigest.h
  • From: Robert Martin <email@hidden>
  • Date: Thu, 20 Nov 2008 22:23:59 -0500

I use CocoaCryptoHashing - which you can find at: http://github.com/ddfreyne

Works like a charm.



On Nov 20, 2008, at 5:22 PM, Andrew Farmer wrote:

On 20 Nov 08, at 14:12, Sebastian Pape wrote:
Hi,
I'm trying to get a MD5 Checksum of a file. This is my code:

[...]
CC_MD5(cStr, strlen(cStr), result);

Does your file contain any null bytes? If so, strlen() will return the wrong length. (It'll just return the length of everything up to the first null byte.) Use [NSData length] instead.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >MD5 Checksum of a file with CommonDigest.h (From: "Sebastian Pape" <email@hidden>)
 >Re: MD5 Checksum of a file with CommonDigest.h (From: Andrew Farmer <email@hidden>)

  • Prev by Date: Re: Wrapping C functions in Objective C proxy objects: naming convention?
  • Next by Date: Re: Cocoa-dev Digest, Vol 5, Issue 1993
  • Previous by thread: Re: MD5 Checksum of a file with CommonDigest.h
  • Next by thread: GC and print operations cause objects not to finalize?
  • Index(es):
    • Date
    • Thread