DSAOpenSsl Constructors

Definition

Overloads

DSAOpenSsl()

Initializes a new instance of the DSAOpenSsl class with a default key size of 2048 bits.

DSAOpenSsl(Int32)

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

DSAOpenSsl(IntPtr)

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

DSAOpenSsl(DSAParameters)

Initializes a new instance of the DSAOpenSsl class and imports parameters from an existing key.

DSAOpenSsl(SafeEvpPKeyHandle)

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

DSAOpenSsl()

Source:
DSAOpenSsl.cs
Source:
DSAOpenSsl.cs
Source:
DSAOpenSsl.cs

Initializes a new instance of the DSAOpenSsl class with a default key size of 2048 bits.

public DSAOpenSsl ();
[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 DSAOpenSsl ();
Attributes

Remarks

This constructor does not generate a new DSA public/private keypair immediately, it just sets the size which will be used to generate a key when one is needed. If 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

.NET 9 og aðrar útgáfur
Vara Útgáfur
.NET 6, 7, 8, 9
.NET Standard 2.0 (package-provided)

DSAOpenSsl(Int32)

Source:
DSAOpenSsl.cs
Source:
DSAOpenSsl.cs
Source:
DSAOpenSsl.cs

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

public DSAOpenSsl (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 DSAOpenSsl (int keySize);

Parameters

keySize
Int32

The size of the key to generate, when a key is needed.

Attributes

Exceptions

The keySize value is not supported by this implementation.

Remarks

This constructor does not generate a new DSA public/private keypair immediately, it just sets the size which will be used to generate a key when one is needed. If key is loaded via the ImportParameters method, or other key import method, the keySize provided to this constructor has no meaning.

See also

Applies to

.NET 9 og aðrar útgáfur
Vara Útgáfur
.NET 6, 7, 8, 9
.NET Standard 2.0 (package-provided)

DSAOpenSsl(IntPtr)

Source:
DSAOpenSsl.cs
Source:
DSAOpenSsl.cs
Source:
DSAOpenSsl.cs

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

public DSAOpenSsl (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 DSAOpenSsl (IntPtr handle);

Parameters

handle
IntPtr

The OpenSSL DSA* value to use as the key.

Attributes

Exceptions

handle is Zero.

handle is not a valid DSA*.

Remarks

Mikilvægt

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

.NET 9 og aðrar útgáfur
Vara Útgáfur
.NET 6, 7, 8, 9
.NET Standard 2.0 (package-provided)

DSAOpenSsl(DSAParameters)

Source:
DSAOpenSsl.cs
Source:
DSAOpenSsl.cs
Source:
DSAOpenSsl.cs

Initializes a new instance of the DSAOpenSsl class and imports parameters from an existing key.

public DSAOpenSsl (System.Security.Cryptography.DSAParameters parameters);
[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 DSAOpenSsl (System.Security.Cryptography.DSAParameters parameters);

Parameters

parameters
DSAParameters

The key parameters to import.

Attributes

Exceptions

parameters is missing required fields.

-or-

parameters has fields with inconsistent lengths for a valid key.

parameters does not represent a valid DSA key parameter set.

See also

Applies to

.NET 9 og aðrar útgáfur
Vara Útgáfur
.NET 6, 7, 8, 9
.NET Standard 2.0 (package-provided)

DSAOpenSsl(SafeEvpPKeyHandle)

Source:
DSAOpenSsl.cs
Source:
DSAOpenSsl.cs
Source:
DSAOpenSsl.cs

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

public DSAOpenSsl (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 DSAOpenSsl (System.Security.Cryptography.SafeEvpPKeyHandle pkeyHandle);

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 DSA key.

Remarks

Mikilvægt

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

.NET 9 og aðrar útgáfur
Vara Útgáfur
.NET 6, 7, 8, 9
.NET Standard 2.0 (package-provided)