ECDiffieHellmanOpenSsl 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 ECDiffieHellmanOpenSsl 类的新实例。
重载
| 名称 | 说明 |
|---|---|
| ECDiffieHellmanOpenSsl() |
使用 NIST P-521/secp521r1 的默认曲线初始化类的新实例 ECDiffieHellmanOpenSsl 。 |
| ECDiffieHellmanOpenSsl(Int32) |
初始化默认为指定大小的 NIST 质曲线的类的新实例 ECDiffieHellmanOpenSsl 。 |
| ECDiffieHellmanOpenSsl(IntPtr) |
从表示为 < |
| ECDiffieHellmanOpenSsl(ECCurve) |
初始化类的新实例 ECDiffieHellmanOpenSsl ,并在指定的曲线上生成一个新键。 |
| ECDiffieHellmanOpenSsl(SafeEvpPKeyHandle) |
从表示为 < |
ECDiffieHellmanOpenSsl()
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
使用 NIST P-521/secp521r1 的默认曲线初始化类的新实例 ECDiffieHellmanOpenSsl 。
public:
ECDiffieHellmanOpenSsl();
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public ECDiffieHellmanOpenSsl();
public ECDiffieHellmanOpenSsl();
Public Sub New ()
- 特性
注解
此构造函数不会立即生成新的公钥/私钥对,它只是设置在需要密钥时将用于生成密钥的大小。 如果密钥是通过 ImportParameters 该方法或其他键导入方法加载的,则此构造函数中的密钥大小没有任何意义。
另请参阅
适用于
ECDiffieHellmanOpenSsl(Int32)
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
初始化默认为指定大小的 NIST 质曲线的类的新实例 ECDiffieHellmanOpenSsl 。
public:
ECDiffieHellmanOpenSsl(int keySize);
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public ECDiffieHellmanOpenSsl(int keySize);
public ECDiffieHellmanOpenSsl(int keySize);
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>]
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : int -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : int -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
Public Sub New (keySize As Integer)
参数
- keySize
- Int32
需要密钥时要生成的密钥的大小。
- 特性
例外
此 keySize 实现不支持该值。
注解
此构造函数仅支持三个键大小:256(NIST P-256/secp256r1)、384(NIST P-384/secp384r1)和 521(NIST P-521/secp521r1)。 若要生成任何其他曲线的键,请使用 ECDiffieHellmanOpenSsl(ECCurve) 构造函数或 GenerateKey(ECCurve) 方法。
此构造函数不会立即生成新的公钥/私钥对,它只是设置在需要密钥时将用于生成密钥的大小。 如果密钥是通过 ImportParameters 该方法或其他键导入方法加载的,则此构造函数中的密钥大小没有任何意义。
另请参阅
适用于
ECDiffieHellmanOpenSsl(IntPtr)
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
从表示为 <
public:
ECDiffieHellmanOpenSsl(IntPtr handle);
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public ECDiffieHellmanOpenSsl(IntPtr handle);
public ECDiffieHellmanOpenSsl(IntPtr handle);
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>]
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : nativeint -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : nativeint -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
Public Sub New (handle As IntPtr)
参数
- handle
-
IntPtr
nativeint
要用作键的 OpenSSL EC_KEY* 值。
- 特性
例外
handle 是 Zero。
handle 不是有效的 EC_KEY*。
注解
Important
OpenSSL 支持在同一进程中加载多个库版本。 在调用此构造函数之前,请验证指针值是否来自此类使用的相同版本的 OpenSSL。 有关详细信息,请参阅 OpenSslVersion。
另请参阅
适用于
ECDiffieHellmanOpenSsl(ECCurve)
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
初始化类的新实例 ECDiffieHellmanOpenSsl ,并在指定的曲线上生成一个新键。
public:
ECDiffieHellmanOpenSsl(System::Security::Cryptography::ECCurve curve);
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public ECDiffieHellmanOpenSsl(System.Security.Cryptography.ECCurve curve);
public ECDiffieHellmanOpenSsl(System.Security.Cryptography.ECCurve curve);
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>]
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : System.Security.Cryptography.ECCurve -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : System.Security.Cryptography.ECCurve -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
Public Sub New (curve As ECCurve)
参数
- curve
- ECCurve
用于生成临时公钥/私钥对的曲线。
- 特性
例外
curve 不验证。
另请参阅
适用于
ECDiffieHellmanOpenSsl(SafeEvpPKeyHandle)
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
从表示为 <
public:
ECDiffieHellmanOpenSsl(System::Security::Cryptography::SafeEvpPKeyHandle ^ pkeyHandle);
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public ECDiffieHellmanOpenSsl(System.Security.Cryptography.SafeEvpPKeyHandle pkeyHandle);
public ECDiffieHellmanOpenSsl(System.Security.Cryptography.SafeEvpPKeyHandle pkeyHandle);
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>]
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : System.Security.Cryptography.SafeEvpPKeyHandle -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : System.Security.Cryptography.SafeEvpPKeyHandle -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
Public Sub New (pkeyHandle As SafeEvpPKeyHandle)
参数
- pkeyHandle
- SafeEvpPKeyHandle
要用作键的 OpenSSL EVP_PKEY* 值,表示为一个 SafeEvpPKeyHandle。
- 特性
例外
pkeyHandle 表示无效的句柄。
pkeyHandle 是 null。
pkeyHandle 不表示椭圆曲线(EC)键。
注解
Important
OpenSSL 支持在同一进程中加载多个库版本。 在调用此构造函数之前,请验证指针值是否来自此类使用的相同版本的 OpenSSL。 有关详细信息,请参阅 OpenSslVersion。