Function SecKeyCopyAttributes

Source
pub unsafe extern "C-unwind" fn SecKeyCopyAttributes(
    key: &SecKey,
) -> Option<CFRetained<CFDictionary>>
Available on crate features SecBase and SecKey only.
Expand description

Retrieve keychain attributes of a key.

Parameter key: The key whose attributes are to be retrieved.

Returns: Dictionary containing attributes of the key. The keys that populate this dictionary are defined and discussed in SecItem.h.

The attributes provided by this function are: kSecAttrCanEncrypt kSecAttrCanDecrypt kSecAttrCanDerive kSecAttrCanSign kSecAttrCanVerify kSecAttrKeyClass kSecAttrKeyType kSecAttrKeySizeInBits kSecAttrTokenID kSecAttrApplicationLabel The set of values is not fixed. Future versions may return more values in this dictionary.