SecKey.GenerateKeyPair Method

Definition

Overloads

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.

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 *  *  -> 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.

[Foundation.Advice("On iOS this method applies the attributes to both public and private key. To apply different attributes to each key, use 'GenerateKeyPair (SecKeyType, int, SecPublicPrivateKeyAttrs, SecPublicPrivateKeyAttrs, out SecKey, out SecKey)' instead.")]
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 *  *  -> 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.

Attributes

Applies to

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 *  *  -> 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