ECDsa.Create Method

Definition

Creates a new instance of an implementation of the Elliptic Curve Digital Signature Algorithm (ECDSA).

Overloads

Create()

Creates a new instance of the default implementation of the Elliptic Curve Digital Signature Algorithm (ECDSA).

Create(ECCurve)

Creates a new instance of the default implementation of the Elliptic Curve Digital Signature Algorithm (ECDSA) with a newly generated key over the specified curve.

Create(ECParameters)

Creates a new instance of the default implementation of the Elliptic Curve Digital Signature Algorithm (ECDSA) using the specified parameters as the key.

Create(String)
Obsolete.

Creates a new instance of the specified implementation of the Elliptic Curve Digital Signature Algorithm (ECDSA).

Create()

Source:
ECDsa.Create.OpenSsl.cs
Source:
ECDsa.Create.OpenSsl.cs
Source:
ECDsa.Create.OpenSsl.cs

Creates a new instance of the default implementation of the Elliptic Curve Digital Signature Algorithm (ECDSA).

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

Returns

A new instance of the default implementation (ECDsaCng) of this class.

Attributes

Applies to

.NET 10 ja muut versiot
Tuote Versiot
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 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 1.6, 2.0, 2.1

Create(ECCurve)

Source:
ECDsa.Create.OpenSsl.cs
Source:
ECDsa.Create.OpenSsl.cs
Source:
ECDsa.Create.OpenSsl.cs

Creates a new instance of the default implementation of the Elliptic Curve Digital Signature Algorithm (ECDSA) with a newly generated key over the specified curve.

C#
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.ECDsa Create(System.Security.Cryptography.ECCurve curve);
C#
public static System.Security.Cryptography.ECDsa Create(System.Security.Cryptography.ECCurve curve);

Parameters

curve
ECCurve

The curve to use for key generation.

Returns

A new instance of the default implementation (ECDsaCng) of this class.

Attributes

See also

Applies to

.NET 10 ja muut versiot
Tuote Versiot
.NET Core 1.0, Core 1.1, 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, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.6, 2.0, 2.1

Create(ECParameters)

Source:
ECDsa.Create.OpenSsl.cs
Source:
ECDsa.Create.OpenSsl.cs
Source:
ECDsa.Create.OpenSsl.cs

Creates a new instance of the default implementation of the Elliptic Curve Digital Signature Algorithm (ECDSA) using the specified parameters as the key.

C#
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.ECDsa Create(System.Security.Cryptography.ECParameters parameters);
C#
public static System.Security.Cryptography.ECDsa Create(System.Security.Cryptography.ECParameters parameters);

Parameters

parameters
ECParameters

The parameters representing the key to use.

Returns

A new instance of the default implementation (ECDsaCng) of this class.

Attributes

See also

Applies to

.NET 10 ja muut versiot
Tuote Versiot
.NET Core 1.0, Core 1.1, 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, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.6, 2.0, 2.1

Create(String)

Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs

Caution

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

Creates a new instance of the specified implementation of the Elliptic Curve Digital Signature Algorithm (ECDSA).

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.ECDsa? Create(string algorithm);
C#
public static System.Security.Cryptography.ECDsa? Create(string algorithm);
C#
public static System.Security.Cryptography.ECDsa Create(string algorithm);

Parameters

algorithm
String

The name of an ECDSA implementation. The following strings all refer to the same implementation, which is the only implementation currently supported in the .NET Framework:

  • "ECDsa"

  • "ECDsaCng"

  • "System.Security.Cryptography.ECDsaCng"

You can also provide the name of a custom ECDSA implementation.

Returns

A new instance of the specified implementation of this class. If the specified algorithm name does not map to an ECDSA implementation, this method returns null.

Attributes

Exceptions

The algorithm parameter is null.

Remarks

If you develop your own implementation of an ECDsa object, you can use the Create(String) method overload to create a custom algorithm string that specifies your implementation.

If you specify a custom value for the algorithm parameter, the CryptoConfig object will use it to determine whether an ECDSA object can be created.

Applies to

.NET 10 ja muut versiot
Tuote Versiot (Vanhentunut)
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6 (7, 8, 9, 10)
.NET Framework 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