CngAlgorithm CngAlgorithm CngAlgorithm CngAlgorithm Class

定義

封裝加密演算法的名稱。Encapsulates the name of an encryption algorithm.

public ref class CngAlgorithm sealed : IEquatable<System::Security::Cryptography::CngAlgorithm ^>
[System.Serializable]
public sealed class CngAlgorithm : IEquatable<System.Security.Cryptography.CngAlgorithm>
type CngAlgorithm = class
    interface IEquatable<CngAlgorithm>
Public NotInheritable Class CngAlgorithm
Implements IEquatable(Of CngAlgorithm)
繼承
CngAlgorithmCngAlgorithmCngAlgorithmCngAlgorithm
屬性
實作

備註

CngAlgorithm類別是一個公用程式類別。The CngAlgorithm class is a utility class. 它包含靜態屬性、 比較方法和私用的內部維護,演算法名稱的字串。It consists of static properties, comparison methods, and a private, internally maintained, algorithm name string.

靜態屬性傳回CngAlgorithm物件。The static properties return CngAlgorithm objects. 每個物件的內部字串會初始化為演算法名稱對應至靜態屬性的名稱。Each object's internal string is initialized to the algorithm name that corresponds to the name of the static property.

您也可以使用這個類別來建立未涵蓋的靜態屬性的演算法類型的物件。You can also use this class to create objects for algorithm types that are not covered by the static properties.

數個 Cryptography Next Generation (CNG) 類別 (例如CngKey) 接受CngAlgorithm物件透過algorithm參數。Several Cryptography Next Generation (CNG) classes (such as CngKey) accept CngAlgorithm objects through an algorithm parameter. 類別是當收到CngAlgorithm物件,它會藉由呼叫物件的擷取內嵌的演算法名稱Algorithm屬性。When the class receives the CngAlgorithm object, it retrieves the embedded algorithm name by calling the object's Algorithm property.

因此,CngAlgorithm做為已知的演算法的列舉。Therefore, CngAlgorithm serves as an enumeration of well-known algorithms. 它可讓您使用強型別的值,而非字串中指定已知的演算法。It lets you specify a well-known algorithm by using a strongly typed value instead of a string.

建構函式

CngAlgorithm(String) CngAlgorithm(String) CngAlgorithm(String) CngAlgorithm(String)

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

屬性

Algorithm Algorithm Algorithm Algorithm

取得目前的 CngAlgorithm 物件指定的演算法名稱。Gets the algorithm name that the current CngAlgorithm object specifies.

ECDiffieHellman ECDiffieHellman ECDiffieHellman ECDiffieHellman

取得 CngAlgorithm 物件,該物件指定橢圓曲線 Diffie-Hellman (ECDH) 金鑰交換演算法,而其曲線是透過金鑰屬性來描述。Gets a CngAlgorithm object that specifies an Elliptic Curve Diffie-Hellman (ECDH) key exchange algorithm whose curve is described via a key property.

ECDiffieHellmanP256 ECDiffieHellmanP256 ECDiffieHellmanP256 ECDiffieHellmanP256

取得 CngAlgorithm 物件,該物件指定使用 P-256 曲線的 Elliptic Curve Diffie-Hellman (ECDH) 金鑰交換演算法。Gets a CngAlgorithm object that specifies an Elliptic Curve Diffie-Hellman (ECDH) key exchange algorithm that uses the P-256 curve.

ECDiffieHellmanP384 ECDiffieHellmanP384 ECDiffieHellmanP384 ECDiffieHellmanP384

取得 CngAlgorithm 物件,該物件指定使用 P-384 曲線的 Elliptic Curve Diffie-Hellman (ECDH) 金鑰交換演算法。Gets a CngAlgorithm object that specifies an Elliptic Curve Diffie-Hellman (ECDH) key exchange algorithm that uses the P-384 curve.

ECDiffieHellmanP521 ECDiffieHellmanP521 ECDiffieHellmanP521 ECDiffieHellmanP521

取得 CngAlgorithm 物件,該物件指定使用 P-521 曲線的 Elliptic Curve Diffie-Hellman (ECDH) 金鑰交換演算法。Gets a CngAlgorithm object that specifies an Elliptic Curve Diffie-Hellman (ECDH) key exchange algorithm that uses the P-521 curve.

ECDsa ECDsa ECDsa ECDsa

取得 CngAlgorithm 物件,該物件指定橢圓曲線數位簽章演算法 (ECDSA),而其曲線是透過索引鍵屬性來描述。Gets a CngAlgorithm object that specifies an Elliptic Curve Digital Signature Algorithm (ECDSA) whose curve is described via a key property.

ECDsaP256 ECDsaP256 ECDsaP256 ECDsaP256

取得 CngAlgorithm 物件,該物件指定使用 P-256 曲線的 Elliptic Curve Digital Signature Algorithm (ECDSA)。Gets a CngAlgorithm object that specifies an Elliptic Curve Digital Signature Algorithm (ECDSA) that uses the P-256 curve.

ECDsaP384 ECDsaP384 ECDsaP384 ECDsaP384

取得 CngAlgorithm 物件,該物件指定使用 P-384 曲線的 Elliptic Curve Digital Signature Algorithm (ECDSA)。Gets a CngAlgorithm object that specifies an Elliptic Curve Digital Signature Algorithm (ECDSA) that uses the P-384 curve.

ECDsaP521 ECDsaP521 ECDsaP521 ECDsaP521

取得新的 CngAlgorithm 物件,該物件指定使用 P-521 曲線的 Elliptic Curve Digital Signature Algorithm (ECDSA)。Gets a new CngAlgorithm object that specifies an Elliptic Curve Digital Signature Algorithm (ECDSA) that uses the P-521 curve.

MD5 MD5 MD5 MD5

取得新的 CngAlgorithm 物件,該物件指定 Message Digest 5 (MD5) 雜湊演算法。Gets a new CngAlgorithm object that specifies the Message Digest 5 (MD5) hash algorithm.

Rsa Rsa Rsa Rsa

取得新的 CngAlgorithm 物件,該物件指定 RSA 雜湊演算法。Gets a new CngAlgorithm object that specifies the RSA hash algorithm.

Sha1 Sha1 Sha1 Sha1

取得新的 CngAlgorithm 物件,該物件指定 Secure Hash Algorithm 1 (SHA-1) 演算法。Gets a new CngAlgorithm object that specifies the Secure Hash Algorithm 1 (SHA-1) algorithm.

Sha256 Sha256 Sha256 Sha256

取得新的 CngAlgorithm 物件,該物件指定 Secure Hash Algorithm 256 (SHA-256) 演算法。Gets a new CngAlgorithm object that specifies the Secure Hash Algorithm 256 (SHA-256) algorithm.

Sha384 Sha384 Sha384 Sha384

取得新的 CngAlgorithm 物件,該物件指定 Secure Hash Algorithm 384 (SHA-384) 演算法。Gets a new CngAlgorithm object that specifies the Secure Hash Algorithm 384 (SHA-384) algorithm.

Sha512 Sha512 Sha512 Sha512

取得新的 CngAlgorithm 物件,該物件指定 Secure Hash Algorithm 512 (SHA-512) 演算法。Gets a new CngAlgorithm object that specifies the Secure Hash Algorithm 512 (SHA-512) algorithm.

方法

Equals(CngAlgorithm) Equals(CngAlgorithm) Equals(CngAlgorithm) Equals(CngAlgorithm)

將指定的 CngAlgorithm 物件與目前的 CngAlgorithm 物件相比較。Compares the specified CngAlgorithm object to the current CngAlgorithm object.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

將指定的物件與目前的 CngAlgorithm 物件相比較。Compares the specified object to the current CngAlgorithm object.

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

針對目前 CngAlgorithm 物件中內嵌的演算法名稱產生雜湊值。Generates a hash value for the algorithm name that is embedded in the current CngAlgorithm object.

GetType() GetType() GetType() GetType()

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

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

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

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

取得目前的 CngAlgorithm 物件指定的演算法名稱。Gets the name of the algorithm that the current CngAlgorithm object specifies.

運算子

Equality(CngAlgorithm, CngAlgorithm) Equality(CngAlgorithm, CngAlgorithm) Equality(CngAlgorithm, CngAlgorithm) Equality(CngAlgorithm, CngAlgorithm)

判斷兩個 CngAlgorithm 物件是否指定相同的演算法名稱。Determines whether two CngAlgorithm objects specify the same algorithm name.

Inequality(CngAlgorithm, CngAlgorithm) Inequality(CngAlgorithm, CngAlgorithm) Inequality(CngAlgorithm, CngAlgorithm) Inequality(CngAlgorithm, CngAlgorithm)

判斷兩個 CngAlgorithm 物件是否未指定相同的演算法。Determines whether two CngAlgorithm objects do not specify the same algorithm.

適用於