• 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: Andrew Farmer <email@hidden>
  • Date: Thu, 20 Nov 2008 14:22:28 -0800

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


  • Follow-Ups:
    • Re: MD5 Checksum of a file with CommonDigest.h
      • From: Robert Martin <email@hidden>
References: 
 >MD5 Checksum of a file with CommonDigest.h (From: "Sebastian Pape" <email@hidden>)

  • Prev by Date: MD5 Checksum of a file with CommonDigest.h
  • Next by Date: Re: Crash in Attributed String (x64)
  • Previous by thread: MD5 Checksum of a file with CommonDigest.h
  • Next by thread: Re: MD5 Checksum of a file with CommonDigest.h
  • Index(es):
    • Date
    • Thread