CngKey.Exists Methode

Definition

Sucht nach einem benannten Schlüssel in einem angegebenen Schlüsselspeicheranbieter (KSP).

Überlädt

Exists(String)

Überprüft, ob ein benannter Schlüssel im Standardschlüsselspeicheranbieter (KSP) vorhanden ist.

Exists(String, CngProvider)

Überprüft, ob ein benannter Schlüssel im angegebenen Schlüsselspeicheranbieter (KSP) vorhanden ist.

Exists(String, CngProvider, CngKeyOpenOptions)

Überprüft unter Verwendung der angegebenen Optionen, ob ein benannter Schlüssel im angegebenen Schlüsselspeicheranbieter (KSP) vorhanden ist.

Exists(String)

Quelle:
Cng.NotSupported.cs
Quelle:
Cng.NotSupported.cs
Quelle:
Cng.NotSupported.cs

Überprüft, ob ein benannter Schlüssel im Standardschlüsselspeicheranbieter (KSP) vorhanden ist.

public:
 static bool Exists(System::String ^ keyName);
public static bool Exists (string keyName);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static bool Exists (string keyName);
static member Exists : string -> bool
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Exists : string -> bool
Public Shared Function Exists (keyName As String) As Boolean

Parameter

keyName
String

Der Name des Schlüssels.

Gibt zurück

true, wenn der benannte Schlüssel im Standard-KSP vorhanden ist, andernfalls false.

Attribute

Ausnahmen

keyName ist null.

Cryptography Next Generation (CNG) wird auf diesem System nicht unterstützt.

Alle anderen Fehler.

Hinweise

Der Standard-KSP ist MicrosoftSoftwareKeyStorageProvider.

Gilt für:

Exists(String, CngProvider)

Quelle:
Cng.NotSupported.cs
Quelle:
Cng.NotSupported.cs
Quelle:
Cng.NotSupported.cs

Überprüft, ob ein benannter Schlüssel im angegebenen Schlüsselspeicheranbieter (KSP) vorhanden ist.

public:
 static bool Exists(System::String ^ keyName, System::Security::Cryptography::CngProvider ^ provider);
public static bool Exists (string keyName, System.Security.Cryptography.CngProvider provider);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static bool Exists (string keyName, System.Security.Cryptography.CngProvider provider);
static member Exists : string * System.Security.Cryptography.CngProvider -> bool
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Exists : string * System.Security.Cryptography.CngProvider -> bool
Public Shared Function Exists (keyName As String, provider As CngProvider) As Boolean

Parameter

keyName
String

Der Name des Schlüssels.

provider
CngProvider

Der KSP, in dem nach dem Schlüssel gesucht wird.

Gibt zurück

true, wenn der benannte Schlüssel im angegebenen Anbieter vorhanden ist, andernfalls false.

Attribute

Ausnahmen

keyName oder provider ist null.

Cryptography Next Generation (CNG) wird auf diesem System nicht unterstützt.

Alle anderen Fehler.

Hinweise

Verwenden Sie diese Überladung, um zu überprüfen, ob ein Schlüssel in einem anderen KSP als dem Standard-KSP vorhanden ist MicrosoftSoftwareKeyStorageProvider.

Gilt für:

Exists(String, CngProvider, CngKeyOpenOptions)

Quelle:
Cng.NotSupported.cs
Quelle:
Cng.NotSupported.cs
Quelle:
Cng.NotSupported.cs

Überprüft unter Verwendung der angegebenen Optionen, ob ein benannter Schlüssel im angegebenen Schlüsselspeicheranbieter (KSP) vorhanden ist.

public:
 static bool Exists(System::String ^ keyName, System::Security::Cryptography::CngProvider ^ provider, System::Security::Cryptography::CngKeyOpenOptions options);
public static bool Exists (string keyName, System.Security.Cryptography.CngProvider provider, System.Security.Cryptography.CngKeyOpenOptions options);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static bool Exists (string keyName, System.Security.Cryptography.CngProvider provider, System.Security.Cryptography.CngKeyOpenOptions options);
[System.Security.SecurityCritical]
public static bool Exists (string keyName, System.Security.Cryptography.CngProvider provider, System.Security.Cryptography.CngKeyOpenOptions options);
static member Exists : string * System.Security.Cryptography.CngProvider * System.Security.Cryptography.CngKeyOpenOptions -> bool
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Exists : string * System.Security.Cryptography.CngProvider * System.Security.Cryptography.CngKeyOpenOptions -> bool
[<System.Security.SecurityCritical>]
static member Exists : string * System.Security.Cryptography.CngProvider * System.Security.Cryptography.CngKeyOpenOptions -> bool
Public Shared Function Exists (keyName As String, provider As CngProvider, options As CngKeyOpenOptions) As Boolean

Parameter

keyName
String

Der Name des Schlüssels.

provider
CngProvider

Der KSP, in dem nach dem Schlüssel gesucht wird.

options
CngKeyOpenOptions

Eine bitweise Kombination der Enumerationswerte, die Optionen für das Öffnen eines Schlüssels angeben.

Gibt zurück

true, wenn der benannte Schlüssel im angegebenen Anbieter vorhanden ist, andernfalls false.

Attribute

Ausnahmen

keyName oder provider ist null.

Cryptography Next Generation (CNG) wird auf diesem System nicht unterstützt.

Alle anderen Fehler.

Hinweise

Verwenden Sie diese Überladung, um zu überprüfen, ob in einem anderen KSP als dem Standardschlüssel MicrosoftSoftwareKeyStorageProviderein Schlüssel vorhanden ist, und um schlüsseloffene Optionen anzugeben.

Gilt für: