Re: Checksums and best way to get'em
Re: Checksums and best way to get'em
- Subject: Re: Checksums and best way to get'em
- From: Shawn Erickson <email@hidden>
- Date: Tue, 8 Jun 2004 08:38:35 -0700
You don't.
On Jun 8, 2004, at 8:16 AM, April Gendill wrote:
I guess then that the big question is how do I stop re-binding?
April.
On Jun 8, 2004, at 6:30 AM, Nick Zitzmann wrote:
On Jun 7, 2004, at 11:33 PM, April Gendill wrote:
But i'll try. How would one generate a checksum of a file and then
using that check sum verify whether or not changes have been made to
the file?
One other way of doing this is to use the MD5 or SHA-1 functions from
OpenSSL's libcrypto library. You can then read in the file using
read() or fread(), pass each byte through the "update" function, and
get the final digest from the "final" function. You can find out more
by running an apropos search for "md5" and "sha" on your computer if
you installed the BSD SDK when you installed Xcode.
If you do a checksum on a file, and it's different than the last time
the checksum was performed, then the file was changed. I assume you
know how to compare strings. Keep in mind that, if you're using these
functions to get the checksum of a prebound binary, then the checksum
will change when the binary is re-bound.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.