CngProvider 类

定义

封装用于下一代加密技术 (CNG) 对象的密钥存储提供程序 (KSP) 名称。Encapsulates the name of a key storage provider (KSP) for use with Cryptography Next Generation (CNG) objects.

public ref class CngProvider sealed : IEquatable<System::Security::Cryptography::CngProvider ^>
public sealed class CngProvider : IEquatable<System.Security.Cryptography.CngProvider>
[System.Serializable]
public sealed class CngProvider : IEquatable<System.Security.Cryptography.CngProvider>
type CngProvider = class
    interface IEquatable<CngProvider>
[<System.Serializable>]
type CngProvider = class
    interface IEquatable<CngProvider>
Public NotInheritable Class CngProvider
Implements IEquatable(Of CngProvider)
继承
CngProvider
属性
实现

注解

CngProvider类是一个实用工具类。The CngProvider class is a utility class. 它由静态属性、比较方法和用于指定密钥存储提供程序的私有、内部维护的字符串组成。It consists of static properties, comparison methods, and a private, internally maintained string that specifies a key storage provider.

静态属性返回 CngProvider 对象。The static properties return CngProvider objects. 每个对象的内部字符串都初始化为与静态属性的名称对应的提供程序名称。Each object's internal string is initialized to the provider name that corresponds to the name of the static property.

你还可以使用此类为静态属性未涵盖的提供程序类型创建对象。You can also use this class to create objects for provider types that are not covered by the static properties.

某些 CNG 类 (如 CngKey) CngProvider 通过参数接受对象 providerSeveral CNG classes (such as CngKey) accept CngProvider objects through a provider parameter. 当类接收对象时 CngProvider ,它通过调用对象的属性来检索嵌入的提供程序名称 ProviderWhen the class receives the CngProvider object, it retrieves the embedded provider name by calling the object's Provider property.

因此,用作 CngProvider 已知提供程序的枚举。Therefore, CngProvider serves as an enumeration of well-known providers. 它允许使用强类型化值而不是字符串来标识提供者。It lets you identify a provider by using a strongly typed value instead of a string.

构造函数

CngProvider(String)

初始化 CngProvider 类的新实例。Initializes a new instance of the CngProvider class.

属性

MicrosoftSmartCardKeyStorageProvider

获取 CngProvider 对象,该对象指定 Microsoft 智能卡密钥存储提供程序。Gets a CngProvider object that specifies the Microsoft Smart Card Key Storage Provider.

MicrosoftSoftwareKeyStorageProvider

获取 CngProvider 对象,该对象指定 Microsoft 软件密钥存储提供程序。Gets a CngProvider object that specifies the Microsoft Software Key Storage Provider.

Provider

获取当前 CngProvider 对象指定的密钥存储提供程序 (KSP) 的名称。Gets the name of the key storage provider (KSP) that the current CngProvider object specifies.

方法

Equals(CngProvider)

将指定的 CngProvider 对象与当前的 CngProvider 对象进行比较。Compares the specified CngProvider object to the current CngProvider object.

Equals(Object)

将指定的对象与当前的 CngProvider 对象进行比较。Compares the specified object to the current CngProvider object.

GetHashCode()

生成一个嵌入在当前 CngProvider 对象中的密钥存储提供程序 (KSP) 名称的哈希值。Generates a hash value for the name of the key storage provider (KSP) that is embedded in the current CngProvider object.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

获取当前 CngProvider 对象指定的密钥存储提供程序 (KSP) 的名称。Gets the name of the key storage provider (KSP) that the current CngProvider object specifies.

运算符

Equality(CngProvider, CngProvider)

确定两个 CngProvider 对象是否指定相同的密钥存储提供程序 (KSP)。Determines whether two CngProvider objects specify the same key storage provider (KSP).

Inequality(CngProvider, CngProvider)

确定两个 CngProvider 对象是否不表示相同的密钥存储提供程序 (KSP)。Determines whether two CngProvider objects do not represent the same key storage provider (KSP).

适用于