Share via


SecKey.CreateRandomKey Method

Definition

Overloads

Name Description
CreateRandomKey(NSDictionary, NSError)

Creates and returns a new key pair.

CreateRandomKey(SecKeyGenerationParameters, NSError)

Creates and returns a new key pair.

CreateRandomKey(SecKeyType, Int32, NSDictionary, NSError)

Creates and returns a new key pair.

CreateRandomKey(NSDictionary, NSError)

Creates and returns a new key pair.

public static Security.SecKey? CreateRandomKey(Foundation.NSDictionary parameters, out Foundation.NSError? error);
static member CreateRandomKey : Foundation.NSDictionary * NSError -> Security.SecKey

Parameters

parameters
NSDictionary

A dictionary of SecKeyGenerationParameters values, keyed by keys from SecKeyParameters.

error
NSError

A location in which to write codes for any errors that occur.

Returns

A new key pair.

Applies to

CreateRandomKey(SecKeyGenerationParameters, NSError)

Creates and returns a new key pair.

public static Security.SecKey? CreateRandomKey(Security.SecKeyGenerationParameters parameters, out Foundation.NSError? error);
static member CreateRandomKey : Security.SecKeyGenerationParameters * NSError -> Security.SecKey

Parameters

parameters
SecKeyGenerationParameters

A parameter object for specifying details about the key pair to create.

error
NSError

A location in which to write codes for any errors that occur.

Returns

A new key pair.

Applies to

CreateRandomKey(SecKeyType, Int32, NSDictionary, NSError)

Creates and returns a new key pair.

public static Security.SecKey? CreateRandomKey(Security.SecKeyType keyType, int keySizeInBits, Foundation.NSDictionary? parameters, out Foundation.NSError? error);
static member CreateRandomKey : Security.SecKeyType * int * Foundation.NSDictionary * NSError -> Security.SecKey

Parameters

keyType
SecKeyType

Whether to create a DSA elliptic curve or RSA key.

keySizeInBits
Int32
parameters
NSDictionary

A dictionary of SecKeyGenerationParameters values, keyed by keys from SecKeyParameters.

error
NSError

A location in which to write codes for any errors that occur.

Returns

A new key pair.

Applies to