CngProvider CngProvider CngProvider CngProvider Class

定义

封装与下一代加密技术 (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 ^>
[System.Serializable]
public sealed class CngProvider : IEquatable<System.Security.Cryptography.CngProvider>
type CngProvider = class
    interface IEquatable<CngProvider>
Public NotInheritable Class CngProvider
Implements IEquatable(Of CngProvider)
继承
CngProviderCngProviderCngProviderCngProvider
属性
实现

注解

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 provider参数接受对象。Several CNG classes (such as CngKey) accept CngProvider objects through a provider parameter. 当类接收CngProvider对象时, 它通过调用对象的Provider属性来检索嵌入的提供程序名称。When 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(String) CngProvider(String) CngProvider(String)

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

属性

MicrosoftSmartCardKeyStorageProvider MicrosoftSmartCardKeyStorageProvider MicrosoftSmartCardKeyStorageProvider MicrosoftSmartCardKeyStorageProvider

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

MicrosoftSoftwareKeyStorageProvider MicrosoftSoftwareKeyStorageProvider MicrosoftSoftwareKeyStorageProvider MicrosoftSoftwareKeyStorageProvider

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

Provider Provider Provider Provider

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

方法

Equals(CngProvider) Equals(CngProvider) Equals(CngProvider) Equals(CngProvider)

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

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

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

GetHashCode() GetHashCode() GetHashCode() 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() 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()

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

操作员

Equality(CngProvider, CngProvider) Equality(CngProvider, CngProvider) Equality(CngProvider, CngProvider) Equality(CngProvider, CngProvider)

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

Inequality(CngProvider, CngProvider) Inequality(CngProvider, CngProvider) Inequality(CngProvider, CngProvider) Inequality(CngProvider, CngProvider)

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

适用于