SecKey.CreateRandomKey SecKey.CreateRandomKey Method

Definition

Overloads

CreateRandomKey(NSDictionary, NSError) CreateRandomKey(NSDictionary, NSError)

Creates and returns a new key pair.

CreateRandomKey(SecKeyGenerationParameters, NSError) CreateRandomKey(SecKeyGenerationParameters, NSError)

Creates and returns a new key pair.

CreateRandomKey(SecKeyType, Int32, NSDictionary, NSError) CreateRandomKey(SecKeyType, Int32, NSDictionary, NSError)

Creates and returns a new key pair.

CreateRandomKey(NSDictionary, NSError) CreateRandomKey(NSDictionary, NSError)

Creates and returns a new key pair.

[ObjCRuntime.TV(10, 0)]
[ObjCRuntime.Watch(3, 0)]
public static Security.SecKey CreateRandomKey (Foundation.NSDictionary parameters, out Foundation.NSError error);
static member CreateRandomKey : Foundation.NSDictionary *  -> Security.SecKey

Parameters

parameters
NSDictionary NSDictionary

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

error
NSError NSError

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

Returns

A new key pair.

CreateRandomKey(SecKeyGenerationParameters, NSError) CreateRandomKey(SecKeyGenerationParameters, NSError)

Creates and returns a new key pair.

[ObjCRuntime.TV(10, 0)]
[ObjCRuntime.Watch(3, 0)]
public static Security.SecKey CreateRandomKey (Security.SecKeyGenerationParameters parameters, out Foundation.NSError error);
static member CreateRandomKey : Security.SecKeyGenerationParameters *  -> Security.SecKey

Parameters

parameters
SecKeyGenerationParameters SecKeyGenerationParameters

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

error
NSError NSError

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

Returns

A new key pair.

CreateRandomKey(SecKeyType, Int32, NSDictionary, NSError) CreateRandomKey(SecKeyType, Int32, NSDictionary, NSError)

Creates and returns a new key pair.

[ObjCRuntime.TV(10, 0)]
[ObjCRuntime.Watch(3, 0)]
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 *  -> Security.SecKey

Parameters

keyType
SecKeyType SecKeyType

Whether to create a DSA elliptic curve or RSA key.

keySizeInBits
Int32 Int32
parameters
NSDictionary NSDictionary

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

error
NSError NSError

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

Returns

A new key pair.

Applies to