![]() |
KCAddItem |
||||
Header: | Keychain.h | Carbon status: | Under Evaluation | |
Adds a password or other keychain item to the default keychain.
OSStatus KCAddItem ( KCItemRef item );
A reference to the keychain item you wish to add. If you pass an existing item in the keychain, the item is updated. If you pass an item that has not been previously added to the keychain and an identical item already exists in the keychain, KCAddItem returns the result code errKCDuplicateItem.
A result code. The result code errKCNoDefaultKeychain indicates that no default keychain could be found. The result code errKCInvalidItemRef indicates that the specified keychain item reference was invalid. The result code errKCDuplicateItem indicates that you tried to add a new item that already exists in the keychain.
You can use the KCAddItem function to add a password or other keychain item to the permanent data store of the default keychain. If you want to add a password to a keychain other than the default, call the function KCSetDefaultKeychain to change the default keychain. KCAddItem will automatically call the function KCUnlock to display the Unlock Keychain dialog box if the keychain containing the item is currently locked.
Available beginning with Keychain Manager 1.0.
© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)