Re: MD5 Checksum of a file with CommonDigest.h
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