ECDiffieHellmanOpenSsl 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
ECDiffieHellmanOpenSsl() |
使用 NIST P-521/secp521r1 的默认曲线初始化 ECDiffieHellmanOpenSsl 类的新实例。 |
ECDiffieHellmanOpenSsl(Int32) |
初始化 ECDiffieHellmanOpenSsl 类的新实例,该类默认为指定大小的 NIST 主曲线。 |
ECDiffieHellmanOpenSsl(IntPtr) |
从表示为 |
ECDiffieHellmanOpenSsl(ECCurve) |
初始化 ECDiffieHellmanOpenSsl 类的新实例,并在指定的曲线上生成新的密钥。 |
ECDiffieHellmanOpenSsl(SafeEvpPKeyHandle) |
从表示为 |
ECDiffieHellmanOpenSsl()
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
使用 NIST P-521/secp521r1 的默认曲线初始化 ECDiffieHellmanOpenSsl 类的新实例。
public:
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 Sub New ()
- 属性
注解
此构造函数不会立即生成新的公钥/私钥对,它只是设置需要密钥时将用于生成密钥的大小。 如果通过 ImportParameters 方法或其他密钥导入方法加载密钥,则此构造函数中的密钥大小没有意义。
另请参阅
适用于
ECDiffieHellmanOpenSsl(Int32)
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
初始化 ECDiffieHellmanOpenSsl 类的新实例,该类默认为指定大小的 NIST 主曲线。
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")]
public ECDiffieHellmanOpenSsl (int keySize);
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : int -> System.Security.Cryptography.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")>]
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
从表示为 EC_KEY*
的现有 ECDiffieHellmanOpenSsl OpenSSL 键初始化 类的新实例。
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")]
public ECDiffieHellmanOpenSsl (IntPtr handle);
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : nativeint -> System.Security.Cryptography.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")>]
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*
。
注解
重要
OpenSSL 支持在同一进程中加载多个库版本。 在调用此构造函数之前,请验证指针值来自此类使用的同一版本的 OpenSSL。 有关详细信息,请参阅 OpenSslVersion。
另请参阅
适用于
ECDiffieHellmanOpenSsl(ECCurve)
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
- Source:
- ECDiffieHellmanOpenSsl.cs
初始化 ECDiffieHellmanOpenSsl 类的新实例,并在指定的曲线上生成新的密钥。
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")]
public ECDiffieHellmanOpenSsl (System.Security.Cryptography.ECCurve curve);
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : System.Security.Cryptography.ECCurve -> System.Security.Cryptography.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")>]
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
从表示为 EVP_PKEY*
的现有 ECDiffieHellmanOpenSsl OpenSSL 键初始化 类的新实例。
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")]
public ECDiffieHellmanOpenSsl (System.Security.Cryptography.SafeEvpPKeyHandle pkeyHandle);
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : System.Security.Cryptography.SafeEvpPKeyHandle -> System.Security.Cryptography.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")>]
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) 密钥。
注解
重要
OpenSSL 支持在同一进程中加载多个库版本。 在调用此构造函数之前,请验证指针值来自此类使用的同一版本的 OpenSSL。 有关详细信息,请参阅 OpenSslVersion。