How the Finder can determine which application handles a particular file on MacOS X?
How the Finder can distinguish a bundle from a simple folder ? *
How the Finder can set the document's icon.
All these operations are handled by the MacOS X Launch Service. This service uses a database to record informations about all applications.
By example, when the finder copies an application on the hard drive from a distant volume or any other device, it populates the registry with the informations contained in the Content.plist file.
You can explore and modify the Launch Service database with a the little tool called lsregister located at path /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister.
(*) the finder examinates also the HFS+ bundle flag on a folder to detect a bundle. You can use the developer tool SetFile to switch on/off the flag
For this first tip, I just want to help you performing basic operations like generating digests (MD5, SHA1, …) or dealing with asymetric keys in your programs.
On the Mac OS X platform, there are basically two libraries providing these crypto capabilities :
1 - openSSL
2 - Apple CDSA
For the first one, just import the header(s) you need from /usr/include/openssl and then link your product with the /usr/lib/libsecurity.dylib.
With CDSA, you have to add the /System/Library/Frameworks/Security.framework to your Xcode project and then link your product with it.
It seems to me that openSSL is easier to use but the choice between these two libraries may be triggered by politics.
For the CDSA documentation, I strongly recommend you to download and read the examples provided by Apple : CryptoSample