ECDsa.Create 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立一個新的橢圓曲線數位簽章演算法(ECDSA)實作實例。
多載
| 名稱 | Description |
|---|---|
| Create() |
建立橢圓曲線數位簽章演算法(ECDSA)預設實作的新實例。 |
| Create(ECCurve) |
建立橢圓曲線數位簽章演算法(ECDSA)預設實作的新實例,並以新產生的金鑰覆蓋指定曲線。 |
| Create(ECParameters) |
以指定參數作為鍵,建立橢圓曲線數位簽章演算法(ECDSA)預設實作的新實例。 |
| Create(String) |
已淘汰.
建立指定的橢圓曲線數位簽章演算法(ECDSA)實例。 |
Create()
建立橢圓曲線數位簽章演算法(ECDSA)預設實作的新實例。
public:
static System::Security::Cryptography::ECDsa ^ Create();
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.ECDsa Create();
public static System.Security.Cryptography.ECDsa Create();
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member Create : unit -> System.Security.Cryptography.ECDsa
static member Create : unit -> System.Security.Cryptography.ECDsa
Public Shared Function Create () As ECDsa
傳回
此類別預設實作ECDsaCng()的新實例。
- 屬性
適用於
Create(ECCurve)
建立橢圓曲線數位簽章演算法(ECDSA)預設實作的新實例,並以新產生的金鑰覆蓋指定曲線。
public:
static System::Security::Cryptography::ECDsa ^ Create(System::Security::Cryptography::ECCurve curve);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.ECDsa Create(System.Security.Cryptography.ECCurve curve);
public static System.Security.Cryptography.ECDsa Create(System.Security.Cryptography.ECCurve curve);
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member Create : System.Security.Cryptography.ECCurve -> System.Security.Cryptography.ECDsa
static member Create : System.Security.Cryptography.ECCurve -> System.Security.Cryptography.ECDsa
Public Shared Function Create (curve As ECCurve) As ECDsa
參數
- curve
- ECCurve
用於金鑰產生的曲線。
傳回
此類別預設實作ECDsaCng()的新實例。
- 屬性
另請參閱
適用於
Create(ECParameters)
以指定參數作為鍵,建立橢圓曲線數位簽章演算法(ECDSA)預設實作的新實例。
public:
static System::Security::Cryptography::ECDsa ^ Create(System::Security::Cryptography::ECParameters parameters);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.ECDsa Create(System.Security.Cryptography.ECParameters parameters);
public static System.Security.Cryptography.ECDsa Create(System.Security.Cryptography.ECParameters parameters);
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member Create : System.Security.Cryptography.ECParameters -> System.Security.Cryptography.ECDsa
static member Create : System.Security.Cryptography.ECParameters -> System.Security.Cryptography.ECDsa
Public Shared Function Create (parameters As ECParameters) As ECDsa
參數
- parameters
- ECParameters
代表要使用的金鑰的參數。
傳回
此類別預設實作ECDsaCng()的新實例。
- 屬性
另請參閱
適用於
Create(String)
- 來源:
- ECDsa.cs
- 來源:
- ECDsa.cs
- 來源:
- ECDsa.cs
- 來源:
- ECDsa.cs
- 來源:
- ECDsa.cs
警告
Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.
建立指定的橢圓曲線數位簽章演算法(ECDSA)實例。
public:
static System::Security::Cryptography::ECDsa ^ Create(System::String ^ algorithm);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
[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);
public static System.Security.Cryptography.ECDsa? Create(string algorithm);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
public static System.Security.Cryptography.ECDsa? Create(string algorithm);
public static System.Security.Cryptography.ECDsa Create(string algorithm);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")>]
[<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}")>]
static member Create : string -> System.Security.Cryptography.ECDsa
static member Create : string -> System.Security.Cryptography.ECDsa
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")>]
static member Create : string -> System.Security.Cryptography.ECDsa
Public Shared Function Create (algorithm As String) As ECDsa
參數
- algorithm
- String
ECDSA 實作名稱。 以下字串皆指同一實作,這是目前 .NET 框架中唯一支援的實作:
「ECDsa」
「ECDsaCng」
「系統安全.密碼學.ECDsaCng」
你也可以提供自訂的 ECDSA 實作名稱。
傳回
這是該類別指定實作的新實例。 若指定的演算法名稱未映射到 ECDSA 實作,此方法會回傳 null。
- 屬性
例外狀況
參數 algorithm 為 null。
備註
如果你自己開發物件實作 ECDsa ,可以用 Create(String) 方法超載來建立 algorithm 自訂字串來指定你的實作。
如果你為參數指定自訂值 algorithm , CryptoConfig 物件會用它來判斷是否能建立 ECDSA 物件。