Function

SecKeychainItemCreatePersistentReference

Creates a persistent reference for a keychain item.

Declaration

OSStatus SecKeychainItemCreatePersistentReference(SecKeychainItemRef itemRef, CFDataRef  _Nullable *persistentItemRef);

Parameters

itemRef

A keychain item reference for the item for which you want a persistent reference.

persistentItemRef

On return, a persistent reference for the keychain item. You must call the CFRelease function to release this object when you are finished using it.

Return Value

Discussion

Unlike normal references, a persistent reference may be stored on disk or passed between processes. You can convert a persistent reference into an ordinary keychain item reference (SecKeychainItemRef) by calling the SecKeychainItemCopyFromPersistentReference function.

See Also

Legacy Keychain Item Creation

SecKeychainItemCreateFromContent

Creates a new keychain item from the supplied parameters.

SecKeychainItemCreateCopy

Copies a keychain item from one keychain to another.

SecKeychainItemCopyFromPersistentReference

Provides a keychain item reference, given a persistent reference.

SecItemClass

Specifies a keychain item’s class code.