Edit

Share via


ECDsaOpenSsl Constructors

Definition

Overloads

ECDsaOpenSsl()

Initializes a new instance of the ECDsaOpenSsl class.

ECDsaOpenSsl(Int32)

Initializes a new instance of the ECDsaOpenSsl class with a specified target key size.

ECDsaOpenSsl(IntPtr)

Initializes a new instance of the ECDsaOpenSsl class from an existing OpenSSL key represented as an EC_KEY*.

ECDsaOpenSsl(ECCurve)

Initializes a new instance of the ECDsaOpenSsl class and generates a new key on the specified curve.

ECDsaOpenSsl(SafeEvpPKeyHandle)

Initializes a new instance of the ECDsaOpenSsl class from an existing OpenSSL key represented as an EVP_PKEY*.

ECDsaOpenSsl()

Source:
ECDsaOpenSsl.cs
Source:
ECDsaOpenSsl.cs
Source:
ECDsaOpenSsl.cs

Initializes a new instance of the ECDsaOpenSsl class.

public:
 ECDsaOpenSsl();
public ECDsaOpenSsl ();
[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 ECDsaOpenSsl ();
Public Sub New ()
Attributes

Remarks

This constructor does not generate a new public/private keypair immediately. This constructor sets the KeySize property to 521 and when a key is needed, the saved size is used to identify the target curve. If a key is loaded via the ImportParameters method or another key import method, the key size from this constructor has no meaning.

See also

Applies to

ECDsaOpenSsl(Int32)

Source:
ECDsaOpenSsl.cs
Source:
ECDsaOpenSsl.cs
Source:
ECDsaOpenSsl.cs

Initializes a new instance of the ECDsaOpenSsl class with a specified target key size.

public:
 ECDsaOpenSsl(int keySize);
public ECDsaOpenSsl (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 ECDsaOpenSsl (int keySize);
new System.Security.Cryptography.ECDsaOpenSsl : int -> System.Security.Cryptography.ECDsaOpenSsl
[<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.ECDsaOpenSsl : int -> System.Security.Cryptography.ECDsaOpenSsl
Public Sub New (keySize As Integer)

Parameters

keySize
Int32

The size of the key. Valid key sizes are 256, 384, and 521 bits.

Attributes

Exceptions

keySize specifies an invalid length.

Remarks

This constructor does not generate a new public/private keypair immediately. This constructor sets the KeySize property to the provided value and when a key is needed, the saved size is used to identify the target curve. If a key is loaded via the ImportParameters method or another key import method, the key size from this constructor has no meaning.

See also

Applies to

ECDsaOpenSsl(IntPtr)

Source:
ECDsaOpenSsl.cs
Source:
ECDsaOpenSsl.cs
Source:
ECDsaOpenSsl.cs

Initializes a new instance of the ECDsaOpenSsl class from an existing OpenSSL key represented as an EC_KEY*.

public:
 ECDsaOpenSsl(IntPtr handle);
public ECDsaOpenSsl (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 ECDsaOpenSsl (IntPtr handle);
new System.Security.Cryptography.ECDsaOpenSsl : nativeint -> System.Security.Cryptography.ECDsaOpenSsl
[<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.ECDsaOpenSsl : nativeint -> System.Security.Cryptography.ECDsaOpenSsl
Public Sub New (handle As IntPtr)

Parameters

handle
IntPtr

nativeint

The OpenSSL EC_KEY* value to use as the key.

Attributes

Exceptions

handle is Zero.

handle is not a valid EC_KEY*.

Remarks

Important

OpenSSL supports multiple library versions being loaded within the same process. Before calling this constructor, verify that your pointer value came from the same version of OpenSSL that this class uses. For more information, see OpenSslVersion.

See also

Applies to

ECDsaOpenSsl(ECCurve)

Source:
ECDsaOpenSsl.cs
Source:
ECDsaOpenSsl.cs
Source:
ECDsaOpenSsl.cs

Initializes a new instance of the ECDsaOpenSsl class and generates a new key on the specified curve.

public:
 ECDsaOpenSsl(System::Security::Cryptography::ECCurve curve);
public ECDsaOpenSsl (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 ECDsaOpenSsl (System.Security.Cryptography.ECCurve curve);
new System.Security.Cryptography.ECDsaOpenSsl : System.Security.Cryptography.ECCurve -> System.Security.Cryptography.ECDsaOpenSsl
[<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.ECDsaOpenSsl : System.Security.Cryptography.ECCurve -> System.Security.Cryptography.ECDsaOpenSsl
Public Sub New (curve As ECCurve)

Parameters

curve
ECCurve

The curve used to generate an ephemeral public/private key pair.

Attributes

Exceptions

curve does not validate.

curve is null.

See also

Applies to

ECDsaOpenSsl(SafeEvpPKeyHandle)

Source:
ECDsaOpenSsl.cs
Source:
ECDsaOpenSsl.cs
Source:
ECDsaOpenSsl.cs

Initializes a new instance of the ECDsaOpenSsl class from an existing OpenSSL key represented as an EVP_PKEY*.

public:
 ECDsaOpenSsl(System::Security::Cryptography::SafeEvpPKeyHandle ^ pkeyHandle);
public ECDsaOpenSsl (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 ECDsaOpenSsl (System.Security.Cryptography.SafeEvpPKeyHandle pkeyHandle);
new System.Security.Cryptography.ECDsaOpenSsl : System.Security.Cryptography.SafeEvpPKeyHandle -> System.Security.Cryptography.ECDsaOpenSsl
[<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.ECDsaOpenSsl : System.Security.Cryptography.SafeEvpPKeyHandle -> System.Security.Cryptography.ECDsaOpenSsl
Public Sub New (pkeyHandle As SafeEvpPKeyHandle)

Parameters

pkeyHandle
SafeEvpPKeyHandle

The OpenSSL EVP_PKEY* value to use as the key, represented as a SafeEvpPKeyHandle.

Attributes

Exceptions

pkeyHandle represents an invalid handle.

pkeyHandle is null.

pkeyHandle does not represent a elliptic curve (EC) key.

Remarks

In .NET 9 and later versions, external modifications of pkeyHandle also affect the handle stored in the instance that this constructor creates.

Important

OpenSSL supports multiple library versions being loaded within the same process. Before calling this constructor, verify that your pointer value came from the same version of OpenSSL that this class uses. For more information, see OpenSslVersion.

See also

Applies to