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()

Initializes a new instance of the ECDsaOpenSsl class.

public:
 ECDsaOpenSsl();
public ECDsaOpenSsl ();
Public Sub New ()

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 other key import method, the key size from this constructor has no meaning.

See also

Applies to

ECDsaOpenSsl(Int32)

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

public:
 ECDsaOpenSsl(int keySize);
public ECDsaOpenSsl (int keySize);
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.

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 other key import method, the key size from this constructor has no meaning.

See also

Applies to

ECDsaOpenSsl(IntPtr)

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

Parameters

handle
IntPtr

The OpenSSL EC_KEY* value to use as the key.

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 your pointer value came from the same version of OpenSSL that this class uses, see OpenSslVersion for more information.

See also

Applies to

ECDsaOpenSsl(ECCurve)

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);
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.

Exceptions

curve does not validate.

See also

Applies to

ECDsaOpenSsl(SafeEvpPKeyHandle)

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);
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.

Exceptions

pkeyHandle represents an invalid handle.

pkeyHandle is null.

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

Remarks

Important

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

See also

Applies to