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.

下一代加密技术 (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 曲线的椭圆曲线 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 曲线的椭圆曲线 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 曲线的椭圆曲线 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 曲线的椭圆曲线数字签名算法 (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 曲线的椭圆曲线数字签名算法 (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 曲线的椭圆曲线数字签名算法 (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 对象,它指定消息摘要 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 对象,它指定安全哈希算法 1 (SHA-1) 算法。Gets a new CngAlgorithm object that specifies the Secure Hash Algorithm 1 (SHA-1) algorithm.

Sha256 Sha256 Sha256 Sha256

获取一个新的 CngAlgorithm 对象,它指定安全哈希算法 256 (SHA-256) 算法。Gets a new CngAlgorithm object that specifies the Secure Hash Algorithm 256 (SHA-256) algorithm.

Sha384 Sha384 Sha384 Sha384

获取一个新的 CngAlgorithm 对象,它指定安全哈希算法 384 (SHA-384) 算法。Gets a new CngAlgorithm object that specifies the Secure Hash Algorithm 384 (SHA-384) algorithm.

Sha512 Sha512 Sha512 Sha512

获取一个新的 CngAlgorithm 对象,它指定安全哈希算法 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 的浅表副本。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.

适用于