Function

SecKeyIsAlgorithmSupported(_:_:_:)

Returns a Boolean indicating whether a key is suitable for an operation using a certain algorithm.

Declaration

func SecKeyIsAlgorithmSupported(_ key: SecKey, _ operation: SecKeyOperationType, _ algorithm: SecKeyAlgorithm) -> Bool

Parameters

key

The key whose suitability you want to test.

operation

The operation that you want to perform with the key. Use one of the values from SecKeyOperationType.

algorithm

The algorithm that you want to perform with the key. Use one of the values from SecKeyAlgorithm.

Return Value

A Boolean indicating whether the key can be used for the given operation and algorithm.

See Also

Examining Keys

func SecKeyGetBlockSize(SecKey) -> Int

Gets the block length associated with a cryptographic key.

func SecKeyCopyAttributes(SecKey) -> CFDictionary?

Gets the attributes of a given key.

struct SecKeyAlgorithm

The algorithms that cryptographic keys enable.

enum SecKeyOperationType

The types of operations that you can use a cryptographic key to perform.