ECDiffieHellman ECDiffieHellman ECDiffieHellman ECDiffieHellman Class

定義

提供 Elliptic Curve Diffie-Hellman (ECDH) 演算法實作可從中衍生的抽象基底類別。Provides an abstract base class that Elliptic Curve Diffie-Hellman (ECDH) algorithm implementations can derive from. 這個類別提供一組所有 ECDH 實作都必須支援的基本作業。This class provides the basic set of operations that all ECDH implementations must support.

public ref class ECDiffieHellman abstract : System::Security::Cryptography::AsymmetricAlgorithm
public abstract class ECDiffieHellman : System.Security.Cryptography.AsymmetricAlgorithm
type ECDiffieHellman = class
    inherit AsymmetricAlgorithm
Public MustInherit Class ECDiffieHellman
Inherits AsymmetricAlgorithm
繼承
衍生

備註

這個類別做為 ECDH 實作的抽象基底類別。This class serves as the abstract base class for ECDH implementations.

建構函式

ECDiffieHellman() ECDiffieHellman() ECDiffieHellman() ECDiffieHellman()

初始化 ECDiffieHellman 類別的新執行個體。Initializes a new instance of the ECDiffieHellman class.

屬性

KeyExchangeAlgorithm KeyExchangeAlgorithm KeyExchangeAlgorithm KeyExchangeAlgorithm

取得金鑰交換演算法的名稱。Gets the name of the key exchange algorithm.

KeySize KeySize KeySize KeySize

取得或設定非對稱演算法使用的金鑰模數大小,以位元為單位。Gets or sets the size, in bits, of the key modulus used by the asymmetric algorithm.

(Inherited from AsymmetricAlgorithm)
LegalKeySizes LegalKeySizes LegalKeySizes LegalKeySizes

取得非對稱演算法所支援的金鑰大小。Gets the key sizes that are supported by the asymmetric algorithm.

(Inherited from AsymmetricAlgorithm)
PublicKey PublicKey PublicKey PublicKey

取得目前的 Elliptic Curve Diffie-Hellman (ECDH) 執行個體正在使用的公開金鑰。Gets the public key that is being used by the current Elliptic Curve Diffie-Hellman (ECDH) instance.

SignatureAlgorithm SignatureAlgorithm SignatureAlgorithm SignatureAlgorithm

取得簽章演算法的名稱。Gets the name of the signature algorithm.

方法

Clear() Clear() Clear() Clear()

釋放 AsymmetricAlgorithm 類別所使用的所有資源。Releases all resources used by the AsymmetricAlgorithm class.

(Inherited from AsymmetricAlgorithm)
Create() Create() Create() Create()

建立 Elliptic Curve Diffie-Hellman (ECDH) 演算法預設實作的新執行個體。Creates a new instance of the default implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm.

Create(ECCurve) Create(ECCurve) Create(ECCurve) Create(ECCurve)

使用在指定曲線上產生的新公開/私密金鑰組,來建立橢圓曲線 Diffie-Hellman (ECDH) 演算法之預設實作的新執行個體。Creates a new instance of the default implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm with a new public/private key-pair generated over the specified curve.

Create(ECParameters) Create(ECParameters) Create(ECParameters) Create(ECParameters)

使用指定 ECParameters 物件所指定的金鑰,來建立橢圓曲線 Diffie-Hellman (ECDH) 演算法之預設實作的新執行個體。Creates a new instance of the default implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm with the key described by the specified ECParameters object.

Create(String) Create(String) Create(String) Create(String)

建立橢圓曲線 Diffie-Hellman (ECDH) 演算法的指定實作新執行個體。Creates a new instance of the specified implementation of the Elliptic Curve Diffie-Hellman (ECDH) algorithm.

DeriveKeyFromHash(ECDiffieHellmanPublicKey, HashAlgorithmName) DeriveKeyFromHash(ECDiffieHellmanPublicKey, HashAlgorithmName) DeriveKeyFromHash(ECDiffieHellmanPublicKey, HashAlgorithmName) DeriveKeyFromHash(ECDiffieHellmanPublicKey, HashAlgorithmName)

指定另一方的公開金鑰和雜湊演算法的名稱,使用雜湊函式衍生可用來做為金鑰的位元組。Derives bytes that can be used as a key using a hash function, given another party's public key and hash algorithm's name.

DeriveKeyFromHash(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[], Byte[]) DeriveKeyFromHash(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[], Byte[]) DeriveKeyFromHash(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[], Byte[]) DeriveKeyFromHash(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[], Byte[])

在衍生的類別中實作時,使用雜湊函式衍生可用來做為金鑰的位元組,指定另一方的公開金鑰、雜湊演算法的名稱、前面加上的值及附加值。When implemented in a derived class, derives bytes that can be used as a key using a hash function, given another party's public key, hash algorithm's name, a prepend value and an append value.

DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[]) DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[]) DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[]) DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[])

使用雜湊式訊息驗證碼 (HMAC) 衍生可用來做為金鑰的位元組。Derives bytes that can be used as a key using a Hash-based Message Authentication Code (HMAC).

DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[], Byte[], Byte[]) DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[], Byte[], Byte[]) DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[], Byte[], Byte[]) DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[], Byte[], Byte[])

在衍生類別中實作時,使用雜湊式訊息驗證碼 (HMAC) 衍生可用來做為金鑰的位元組。When implemented in a derived class, derives bytes that can be used as a key using a Hash-based Message Authentication Code (HMAC).

DeriveKeyMaterial(ECDiffieHellmanPublicKey) DeriveKeyMaterial(ECDiffieHellmanPublicKey) DeriveKeyMaterial(ECDiffieHellmanPublicKey) DeriveKeyMaterial(ECDiffieHellmanPublicKey)

衍生可用來做為金鑰的位元組,只要有提供另一方的公開金鑰。Derives bytes that can be used as a key, given another party's public key.

DeriveKeyTls(ECDiffieHellmanPublicKey, Byte[], Byte[]) DeriveKeyTls(ECDiffieHellmanPublicKey, Byte[], Byte[]) DeriveKeyTls(ECDiffieHellmanPublicKey, Byte[], Byte[]) DeriveKeyTls(ECDiffieHellmanPublicKey, Byte[], Byte[])

在衍生類別中實作時,使用傳輸層安全性 (TLS) 似隨機函式 (PRF) 衍生演算法,衍生可用來做為金鑰的位元組。When implemented in a derived class, derives bytes that can be used as a key using a Transport Layer Security (TLS) Pseudo-Random Function (PRF) derivation algorithm.

Dispose() Dispose() Dispose() Dispose()

釋放 AsymmetricAlgorithm 類別目前的執行個體所使用的全部資源。Releases all resources used by the current instance of the AsymmetricAlgorithm class.

(Inherited from AsymmetricAlgorithm)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

釋放 AsymmetricAlgorithm 類別所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。Releases the unmanaged resources used by the AsymmetricAlgorithm class and optionally releases the managed resources.

(Inherited from AsymmetricAlgorithm)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
ExportECPrivateKey() ExportECPrivateKey() ExportECPrivateKey() ExportECPrivateKey()
ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters) ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters) ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters) ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters) Inherited from AsymmetricAlgorithm
ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters) ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters) ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters) ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters) Inherited from AsymmetricAlgorithm
ExportExplicitParameters(Boolean) ExportExplicitParameters(Boolean) ExportExplicitParameters(Boolean) ExportExplicitParameters(Boolean)

在衍生類別中覆寫時,會使用明確的曲線形式,將公開或公開和私密金鑰資訊從運作中的 ECDiffieHellman 金鑰匯出至 ECParameters 結構,讓您可將它傳遞至 ImportParameters(ECParameters) 方法。When overridden in a derived class, exports either the public or the public and private key information using the explicit curve form from a working ECDiffieHellman key to an ECParameters structure so that it can be passed to the ImportParameters(ECParameters) method.

ExportParameters(Boolean) ExportParameters(Boolean) ExportParameters(Boolean) ExportParameters(Boolean)

在衍生類別中覆寫時,會將公開或公開和私密金鑰資訊從運作中的 ECDiffieHellman 金鑰匯出至 ECParameters 結構,讓您可將它傳遞至 ImportParameters(ECParameters) 方法。When overridden in a derived class, exports either the public or the public and private key information from a working ECDiffieHellman key to an ECParameters structure so that it can be passed to the ImportParameters(ECParameters) method.

ExportPkcs8PrivateKey() ExportPkcs8PrivateKey() ExportPkcs8PrivateKey() ExportPkcs8PrivateKey() Inherited from AsymmetricAlgorithm
ExportSubjectPublicKeyInfo() ExportSubjectPublicKeyInfo() ExportSubjectPublicKeyInfo() ExportSubjectPublicKeyInfo() Inherited from AsymmetricAlgorithm
FromXmlString(String) FromXmlString(String) FromXmlString(String) FromXmlString(String)
GenerateKey(ECCurve) GenerateKey(ECCurve) GenerateKey(ECCurve) GenerateKey(ECCurve)

在衍生類別中覆寫時,會針對指定的曲線產生新的暫時性公開/私密金鑰組。When overridden in a derived class, generates a new ephemeral public/private key pair for the specified curve.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
ImportECPrivateKey(ReadOnlySpan<Byte>, Int32) ImportECPrivateKey(ReadOnlySpan<Byte>, Int32) ImportECPrivateKey(ReadOnlySpan<Byte>, Int32) ImportECPrivateKey(ReadOnlySpan<Byte>, Int32)
ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32) ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32) ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32) ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32) Inherited from AsymmetricAlgorithm
ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>, Int32) ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>, Int32) ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>, Int32) ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>, Int32) Inherited from AsymmetricAlgorithm
ImportParameters(ECParameters) ImportParameters(ECParameters) ImportParameters(ECParameters) ImportParameters(ECParameters)

在衍生類別中覆寫時,會將 ECCurve 的指定參數做為暫時性金鑰匯入目前的 ECDiffieHellman 物件。When overridden in a derived class, imports the specified parameters for an ECCurve as an ephemeral key into the current ECDiffieHellman object.

ImportPkcs8PrivateKey(ReadOnlySpan<Byte>, Int32) ImportPkcs8PrivateKey(ReadOnlySpan<Byte>, Int32) ImportPkcs8PrivateKey(ReadOnlySpan<Byte>, Int32) ImportPkcs8PrivateKey(ReadOnlySpan<Byte>, Int32) Inherited from AsymmetricAlgorithm
ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>, Int32) ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>, Int32) ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>, Int32) ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>, Int32) Inherited from AsymmetricAlgorithm
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)
ToXmlString(Boolean) ToXmlString(Boolean) ToXmlString(Boolean) ToXmlString(Boolean)
TryExportECPrivateKey(Span<Byte>, Int32) TryExportECPrivateKey(Span<Byte>, Int32) TryExportECPrivateKey(Span<Byte>, Int32) TryExportECPrivateKey(Span<Byte>, Int32)
TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32) TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32) TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32) TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32) Inherited from AsymmetricAlgorithm
TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters, Span<Byte>, Int32) TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters, Span<Byte>, Int32) TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters, Span<Byte>, Int32) TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters, Span<Byte>, Int32) Inherited from AsymmetricAlgorithm
TryExportPkcs8PrivateKey(Span<Byte>, Int32) TryExportPkcs8PrivateKey(Span<Byte>, Int32) TryExportPkcs8PrivateKey(Span<Byte>, Int32) TryExportPkcs8PrivateKey(Span<Byte>, Int32) Inherited from AsymmetricAlgorithm
TryExportSubjectPublicKeyInfo(Span<Byte>, Int32) TryExportSubjectPublicKeyInfo(Span<Byte>, Int32) TryExportSubjectPublicKeyInfo(Span<Byte>, Int32) TryExportSubjectPublicKeyInfo(Span<Byte>, Int32) Inherited from AsymmetricAlgorithm

欄位

KeySizeValue KeySizeValue KeySizeValue KeySizeValue

表示非對稱演算法使用的金鑰模數大小,以位元為單位。Represents the size, in bits, of the key modulus used by the asymmetric algorithm.

(Inherited from AsymmetricAlgorithm)
LegalKeySizesValue LegalKeySizesValue LegalKeySizesValue LegalKeySizesValue

指定非對稱演算法所支援的金鑰大小。Specifies the key sizes that are supported by the asymmetric algorithm.

(Inherited from AsymmetricAlgorithm)

明確介面實作

IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose()

如需這個成員的說明,請參閱 Dispose()For a description of this member, see Dispose().

(Inherited from AsymmetricAlgorithm)

適用於