CngProvider CngProvider CngProvider CngProvider Class

定義

封裝金鑰儲存提供者 (KSP) 的名稱,用來搭配 Cryptography Next Generation (CNG) 物件。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 的淺層複本 (Shallow Copy)。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).

適用於