Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MD5 check sum of a file



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >MD5 check sum of a file (From: <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.