Developer --> Technical Publications

     


Managing Keychains

You can call use the functions described in this section to create an empty keychain, set and obtain the default keychain, get information about a keychain, and enumerate through the available keychains.

The Keychain Manager functions listed in Working With the Default Keychain require an active, or default, keychain. You can call the functions KCSetDefaultKeychain and KCGetDefaultKeychain to set and determine the default keychain. You may wish to call KCSetDefaultKeychain before calling the functions KCAddItem , KCDeleteItem , KCUpdateItem , or KCCopyItem to change the keychain that you are adding, deleting, updating, or copying keychain items from.

There are several Keychain Manager functions that provide information about a keychain. The function KCGetStatus returns the read/write permissions that have been set for a specified keychain. You can determine the name of a keychain by passing a reference to the keychain in question to the function KCGetKeychainName .

You can call the functions KCCountKeychains and KCGetIndKeychain to enumerate through the available keychains.


© 2000 Apple Computer, Inc. (Last Updated 20 July 2000)