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.h



Justin,

Thanks for responding.

On Feb 25, 2004, at 10:00 PM, email@hidden wrote:

Hello, all ...

Hey, I see md5.h in /usr/include/sys ... but I can't seem to find the
library to link with (i'm trying to use MD5File()). This is what I
tried:
[snip]
... a few quick nm's didn't seem to find MD5 stuff in anything but
/usr/lib/libcrypto,dylib. What am I missing?

You are missing the realization that you should not be using headers
from /usr/include/sys in user-level code (with a few exceptions that
are *very* system-specific). If the identifiers are declared in a
<sys/...> header, they will generally be declared and instantiated in
the kernel, and your code can't user them.

After I posted the above question, I found /usr/include/openssl/md5.h, which -- lo and behold -- did not include the MD5File() prototype. So, I downloaded the text_cmds project from Darwin 7, found how it calculated the MD5 sum for a file, and followed its' example. My question now is simply: Why is /usr/include/sys/md5.h even there? No lib on my 10.3.2 box exports the MD5File() function, and from your response, I shouldn't even be using this include file.

Regards,

John

Falling You - exploring the beauty of voice and sound
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.




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.