![]() |
KCNewItem |
||||
Header: | Keychain.h | Carbon status: | Under Evaluation | |
Creates a reference to a keychain item.
OSStatus KCNewItem ( KCItemClass itemClass, OSType itemCreator, UInt32 length, const void *data, KCItemRef *item );
The type of keychain item that you wish to create. See
The creator code of the application that owns this item.
The length of the data to be stored in this item.
A pointer to a buffer containing the data to be stored in this item. Before calling KCNewItem, allocate enough memory for the buffer to hold the data you want to store.
On return, a pointer to a reference to the newly-created item.
A result code. The Memory Manager result code memFullErr indicates that you did not allocate enough memory in the current heap to create the item.
After calling the KCNewItem function, you should call the function KCAddItem if you wish to permanently store a password or other keychain item. Note that a copy of the data buffer pointed to by the data parameter is stored in the newly-created item.
When you are done with a keychain item, you should call the function KCReleaseItem to release its memory. You should not use the item after its memory has been deallocated.
Available beginning with Keychain Manager 1.0.
© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)