Contents

SecKeychainItemCreateCopy(_:_:_:_:)

Copies a keychain item from one keychain to another.

Declaration

func SecKeychainItemCreateCopy(_ itemRef: SecKeychainItem, _ destKeychainRef: SecKeychain?, _ initialAccess: SecAccess?, _ itemCopy: UnsafeMutablePointer<SecKeychainItem?>) -> OSStatus

Parameters

  • itemRef:

    A reference to the keychain item to copy.

  • destKeychainRef:

    A reference to the keychain in which to insert the copied keychain item. Pass NULL to specify the default keychain.

  • initialAccess:

    The initial access for the copied keychain item. Use the Secaccesscreate(_:_:_:) function to create an access object or the Seckeychainitemcopyaccess(_:_:) function to copy an access object from another keychain item. If you pass NULL for this parameter, the access defaults to the application creating the item.

  • itemCopy:

    On return, a pointer to a copy of the keychain item referenced by the itemRef parameter. You must call the CFRelease function to release this object when you are finished using it.

Return Value

A result code. See Security Framework Result Codes.