CngKey.Exists Méthode

Définition

Recherche une clé nommée dans un fournisseur de stockage de clés spécifique(KSP).

Surcharges

Nom Description
Exists(String)

Vérifie si une clé nommée existe dans le fournisseur de stockage de clés (KSP) par défaut.

Exists(String, CngProvider)

Vérifie si une clé nommée existe dans le fournisseur de stockage de clés (KSP) spécifié.

Exists(String, CngProvider, CngKeyOpenOptions)

Vérifie si une clé nommée existe dans le fournisseur de stockage de clés (KSP) spécifié, en fonction des options spécifiées.

Exists(String)

Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs

Vérifie si une clé nommée existe dans le fournisseur de stockage de clés (KSP) par défaut.

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

Paramètres

keyName
String

Nom de la clé.

Retours

true si la clé nommée existe dans le KSP par défaut ; sinon, false.

Attributs

Exceptions

keyName a la valeur null.

Le chiffrement de nouvelle génération (CNG) n’est pas pris en charge sur ce système.

Toutes les autres erreurs.

Remarques

Le KSP par défaut est MicrosoftSoftwareKeyStorageProvider.

S’applique à

Exists(String, CngProvider)

Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs

Vérifie si une clé nommée existe dans le fournisseur de stockage de clés (KSP) spécifié.

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

Paramètres

keyName
String

Nom de la clé.

provider
CngProvider

KSP à vérifier pour la clé.

Retours

true si la clé nommée existe dans le fournisseur spécifié ; sinon, false.

Attributs

Exceptions

keyName ou provider est null.

Le chiffrement de nouvelle génération (CNG) n’est pas pris en charge sur ce système.

Toutes les autres erreurs.

Remarques

Utilisez cette surcharge pour vérifier l’existence d’une clé dans un KSP autre que le KSP par défaut, autrement dit MicrosoftSoftwareKeyStorageProvider.

S’applique à

Exists(String, CngProvider, CngKeyOpenOptions)

Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs

Vérifie si une clé nommée existe dans le fournisseur de stockage de clés (KSP) spécifié, en fonction des options spécifiées.

public:
 static bool Exists(System::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);
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);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member Exists : string * System.Security.Cryptography.CngProvider * System.Security.Cryptography.CngKeyOpenOptions -> bool
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

Paramètres

keyName
String

Nom de la clé.

provider
CngProvider

KSP à rechercher la clé.

options
CngKeyOpenOptions

Combinaison au niveau du bit des valeurs d’énumération qui spécifient les options d’ouverture d’une clé.

Retours

true si la clé nommée existe dans le fournisseur spécifié ; sinon, false.

Attributs

Exceptions

keyName ou provider est null.

Le chiffrement de nouvelle génération (CNG) n’est pas pris en charge sur ce système.

Toutes les autres erreurs.

Remarques

Utilisez cette surcharge pour vérifier l’existence d’une clé dans un KSP autre que la valeur par défaut MicrosoftSoftwareKeyStorageProvideret pour spécifier les options d’ouverture de clé.

S’applique à