Re: MD5 check sum of a file
Re: MD5 check sum of a file
- Subject: Re: MD5 check sum of a file
- From: Nicko van Someren <email@hidden>
- Date: Wed, 13 Feb 2008 11:25:13 +0000
On 13 Feb 2008, at 10:49, <email@hidden> wrote:
I want to find out the md5 check sum of a file while giving the path
of
the file.
I don't want to use NSTask manager and shell command .Hope some one
can
help me to find a solution in this regard.
Is there any API which helps me to find the md5 check sum.?
"man -k md5" might help...
#include <openssl/md5.h>
unsigned char digest[MD5_DIGEST_LENGTH]
NSError *e;
NSData *d = [NSData dataWithContentsOfFile: filePath options:
NSMappedRead error: &e];
if (d == nil)
{ ... barf about e ... }
else
MD5([d bytes], [d length], digest);
_______________________________________________
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