Global Variable

kSecAttrCanEncrypt

A key whose value is a Boolean that indicates whether the cryptographic key can be used for encryption.

Declaration

let kSecAttrCanEncrypt: CFString

Discussion

The corresponding value is of type CFBoolean and indicates whether this cryptographic key can be used to encrypt data.

On key creation, if not explicitly specified, this attribute defaults to kCFBooleanFalse for private keys and kCFBooleanTrue for public keys.

See Also

Optional

let kSecAttrLabel: CFString

A key whose value is a string indicating the item's label.

let kSecAttrTokenID: CFString

A key whose value indicates that a cryptographic key is in an external store.

let kSecAttrIsPermanent: CFString

A key whose value indicates the item's permanence.

let kSecAttrApplicationTag: CFString

A key whose value indicates the item's private tag.

let kSecAttrEffectiveKeySize: CFString

A key whose value indicates the effective number of bits in a cryptographic key.

let kSecAttrCanDecrypt: CFString

A key whose value is a Boolean that indicates whether the cryptographic key can be used for decryption.

let kSecAttrCanDerive: CFString

A key whose value is a Boolean that indicates whether the cryptographic key can be used for derivation.

let kSecAttrCanSign: CFString

A key whose value is a Boolean that indicates whether the cryptographic key can be used for digital signing.

let kSecAttrCanVerify: CFString

A key whose value is a Boolean that indicates whether the cryptographic key can be used for signature verification.

let kSecAttrCanWrap: CFString

A key whose value is a Boolean that indicates whether the cryptographic key can be used for wrapping.

let kSecAttrCanUnwrap: CFString

A key whose value is a Boolean that indicates whether the cryptographic key can be used for unwrapping.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software