Share via


SecKey.CreateRandomKey 方法

定义

重载

CreateRandomKey(NSDictionary, NSError)

创建并返回新的密钥对。

CreateRandomKey(SecKeyGenerationParameters, NSError)

创建并返回新的密钥对。

CreateRandomKey(SecKeyType, Int32, NSDictionary, NSError)

创建并返回新的密钥对。

CreateRandomKey(NSDictionary, NSError)

创建并返回新的密钥对。

[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
NSDictionary

值的字典 SecKeyGenerationParameters ,由 中的 SecKeyParameters键键。

error
NSError

要在其中为发生的任何错误编写代码的位置。

返回

新的密钥对。

属性

适用于

CreateRandomKey(SecKeyGenerationParameters, NSError)

创建并返回新的密钥对。

[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
SecKeyGenerationParameters

一个参数对象,用于指定要创建的密钥对的详细信息。

error
NSError

要在其中为发生的任何错误编写代码的位置。

返回

新的密钥对。

属性

适用于

CreateRandomKey(SecKeyType, Int32, NSDictionary, NSError)

创建并返回新的密钥对。

[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

参数

keyType
SecKeyType

是创建 DSA 椭圆曲线还是 RSA 键。

keySizeInBits
Int32
parameters
NSDictionary

值的字典 SecKeyGenerationParameters ,由 中的 SecKeyParameters键键。

error
NSError

要在其中为发生的任何错误编写代码的位置。

返回

新的密钥对。

属性

适用于