DSA.Create Method

Definition

Creates a cryptographic object used to perform the asymmetric algorithm.

Overloads

Create()

Creates the default cryptographic object used to perform the asymmetric algorithm.

Create(Int32)

Creates a new ephemeral DSA key with the specified key size.

Create(DSAParameters)

Creates a new ephemeral DSA key with the specified DSA key parameters.

Create(String)
Obsolete.

Creates the specified cryptographic object used to perform the asymmetric algorithm.

Create()

Source:
DSA.cs
Source:
DSA.cs
Source:
DSA.cs

Creates the default cryptographic object used to perform the asymmetric algorithm.

C#
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public static System.Security.Cryptography.DSA Create();
C#
public static System.Security.Cryptography.DSA Create();
C#
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public static System.Security.Cryptography.DSA Create();

Returns

DSA

A cryptographic object used to perform the asymmetric algorithm.

Attributes

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Create(Int32)

Source:
DSA.cs
Source:
DSA.cs
Source:
DSA.cs

Creates a new ephemeral DSA key with the specified key size.

C#
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public static System.Security.Cryptography.DSA Create(int keySizeInBits);
C#
public static System.Security.Cryptography.DSA Create(int keySizeInBits);
C#
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public static System.Security.Cryptography.DSA Create(int keySizeInBits);

Parameters

keySizeInBits
Int32

The key size, in bits.

Returns

DSA

A new ephemeral DSA key with the specified key size.

Attributes

Exceptions

keySizeInBits is not permitted by LegalKeySizes.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.7.2, 4.8, 4.8.1
.NET Standard 2.1

Create(DSAParameters)

Source:
DSA.cs
Source:
DSA.cs
Source:
DSA.cs

Creates a new ephemeral DSA key with the specified DSA key parameters.

C#
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public static System.Security.Cryptography.DSA Create(System.Security.Cryptography.DSAParameters parameters);
C#
public static System.Security.Cryptography.DSA Create(System.Security.Cryptography.DSAParameters parameters);
C#
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public static System.Security.Cryptography.DSA Create(System.Security.Cryptography.DSAParameters parameters);

Parameters

parameters
DSAParameters

The parameters for the DSA algorithm.

Returns

DSA

A new ephemeral DSA key.

Attributes

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.7.2, 4.8, 4.8.1
.NET Standard 2.1

Create(String)

Source:
DSA.cs
Source:
DSA.cs
Source:
DSA.cs

Caution

Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.

Creates the specified cryptographic object used to perform the asymmetric algorithm.

C#
[System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.DSA? Create(string algName);
C#
public static System.Security.Cryptography.DSA? Create(string algName);
C#
public static System.Security.Cryptography.DSA Create(string algName);

Parameters

algName
String

The name of the specific implementation of DSA to use.

Returns

DSA

A cryptographic object used to perform the asymmetric algorithm.

Attributes

Remarks

For DSA, use the name System.Security.Cryptography.DSA.

See also

Applies to

.NET 10 and other versions
Product Versions (Obsolete)
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6 (7, 8, 9, 10)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1