Share via


SecKey.GenerateKeyPair Method

Definition

Overloads

Name Description
GenerateKeyPair(SecKeyType, Int32, SecPublicPrivateKeyAttrs, SecPublicPrivateKeyAttrs, SecKey, SecKey)

Generates a key pair from the provided values.

GenerateKeyPair(NSDictionary, SecKey, SecKey)

Generates a key pair from the provided values.

GenerateKeyPair(SecKeyType, Int32, SecPublicPrivateKeyAttrs, SecKey, SecKey)

Generates a key pair from the provided values.

GenerateKeyPair(SecKeyType, Int32, SecPublicPrivateKeyAttrs, SecPublicPrivateKeyAttrs, SecKey, SecKey)

Generates a key pair from the provided values.

public static Security.SecStatusCode GenerateKeyPair(Security.SecKeyType type, int keySizeInBits, Security.SecPublicPrivateKeyAttrs publicKeyAttrs, Security.SecPublicPrivateKeyAttrs privateKeyAttrs, out Security.SecKey? publicKey, out Security.SecKey? privateKey);
static member GenerateKeyPair : Security.SecKeyType * int * Security.SecPublicPrivateKeyAttrs * Security.SecPublicPrivateKeyAttrs * SecKey * SecKey -> Security.SecStatusCode

Parameters

type
SecKeyType

The type of key pair to generate.

keySizeInBits
Int32

The key size, in bits

publicKeyAttrs
SecPublicPrivateKeyAttrs

The public key attributes.

privateKeyAttrs
SecPublicPrivateKeyAttrs

The private key attributes.

publicKey
SecKey

A location to store the public key.

privateKey
SecKey

A location to store the private key.

Returns

A status code for the operation.

Applies to

GenerateKeyPair(NSDictionary, SecKey, SecKey)

Generates a key pair from the provided values.

public static Security.SecStatusCode GenerateKeyPair(Foundation.NSDictionary parameters, out Security.SecKey? publicKey, out Security.SecKey? privateKey);
static member GenerateKeyPair : Foundation.NSDictionary * SecKey * SecKey -> Security.SecStatusCode

Parameters

parameters
NSDictionary

A dictionary of key pair parameters.

publicKey
SecKey

A location to store the public key.

privateKey
SecKey

A location to store the private key.

Returns

A status code for the operation.

Applies to

GenerateKeyPair(SecKeyType, Int32, SecPublicPrivateKeyAttrs, SecKey, SecKey)

Generates a key pair from the provided values.

public static Security.SecStatusCode GenerateKeyPair(Security.SecKeyType type, int keySizeInBits, Security.SecPublicPrivateKeyAttrs publicAndPrivateKeyAttrs, out Security.SecKey? publicKey, out Security.SecKey? privateKey);
static member GenerateKeyPair : Security.SecKeyType * int * Security.SecPublicPrivateKeyAttrs * SecKey * SecKey -> Security.SecStatusCode

Parameters

type
SecKeyType

The type of key pair to generate.

keySizeInBits
Int32

The key size, in bits

publicAndPrivateKeyAttrs
SecPublicPrivateKeyAttrs

Attributes for the keys in the pair.

publicKey
SecKey

A location to store the public key.

privateKey
SecKey

A location to store the private key.

Returns

A status code for the operation.

Remarks

On every platform except macOS this method applies the attributes to both the public and the private key.

Applies to