• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Checksums and best way to get'em
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Checksums and best way to get'em


  • Subject: Re: Checksums and best way to get'em
  • From: Nick Zitzmann <email@hidden>
  • Date: Tue, 8 Jun 2004 07:30:44 -0600

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.


  • Follow-Ups:
    • Re: Checksums and best way to get'em
      • From: April Gendill <email@hidden>
    • Re: Checksums and best way to get'em
      • From: "A.M." <email@hidden>
References: 
 >Checksums and best way to get'em (From: April Gendill <email@hidden>)

  • Prev by Date: [ANN] AutoGraf 1.0.2b - Visual class browser
  • Next by Date: Re: Is it possible to make Dock Icon Jump ??
  • Previous by thread: Re: Checksums and best way to get'em
  • Next by thread: Re: Checksums and best way to get'em
  • Index(es):
    • Date
    • Thread