kSecClassKey
The value that indicates a cryptographic key item.
Declaration
let kSecClassKey: CFStringMentioned in
Discussion
The following keychain item attributes form the composite primary key of a cryptographic key item:
kSecAttrAccessGroup (on macOS, this key only applies if you set kSecUseDataProtectionKeychain or kSecAttrSynchronizable to true)
kSecAttrSynchronizable (on iOS 14 and newer, iOS 11 newer, and watchOS 7 and newer)
Calls to SecItemAdd(_:_:) that add a cryptographic key item with the same values for all of these attributes as an existing item result in errSecDuplicateItem.
The following keychain item attributes apply to a cryptographic key item, and don’t form part of its composite primary key:
kSecAttrAccess (macOS only)
kSecAttrAccessible (on macOS, this key only applies if you set kSecUseDataProtectionKeychain or kSecAttrSynchronizable to true)