CngKey.Exists Método

Definição

Verifica se há uma chave nomeada em um KSP (provedor de armazenamento de chaves) especificado.

Sobrecargas

Exists(String)

Verifica se existe uma chave nomeada no KSP (provedor de armazenamento de chaves) padrão.

Exists(String, CngProvider)

Verifica se existe uma chave nomeada no KSP (provedor de armazenamento de chaves) especificada.

Exists(String, CngProvider, CngKeyOpenOptions)

Verifica se existe uma chave nomeada no KSP (provedor de armazenamento de chaves) especificada, de acordo com as opções especificadas.

Exists(String)

Origem:
Cng.NotSupported.cs
Origem:
Cng.NotSupported.cs
Origem:
Cng.NotSupported.cs

Verifica se existe uma chave nomeada no KSP (provedor de armazenamento de chaves) padrão.

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

Parâmetros

keyName
String

O nome da chave.

Retornos

true se a chave nomeada existir no KSP padrão, caso contrário, false.

Atributos

Exceções

keyName é null.

A CNG (Cryptography Next Generation) não é compatível com este sistema.

Todos os outros erros.

Comentários

O KSP padrão é MicrosoftSoftwareKeyStorageProvider.

Aplica-se a

Exists(String, CngProvider)

Origem:
Cng.NotSupported.cs
Origem:
Cng.NotSupported.cs
Origem:
Cng.NotSupported.cs

Verifica se existe uma chave nomeada no KSP (provedor de armazenamento de chaves) especificada.

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

Parâmetros

keyName
String

O nome da chave.

provider
CngProvider

O KSP a ser verificado para a chave.

Retornos

true se a chave nomeada existir no provedor especificado, caso contrário, false.

Atributos

Exceções

keyName ou provider é null.

A CNG (Cryptography Next Generation) não é compatível com este sistema.

Todos os outros erros.

Comentários

Use essa sobrecarga para marcar a existência de uma chave em um KSP diferente do KSP padrão, que é MicrosoftSoftwareKeyStorageProvider.

Aplica-se a

Exists(String, CngProvider, CngKeyOpenOptions)

Origem:
Cng.NotSupported.cs
Origem:
Cng.NotSupported.cs
Origem:
Cng.NotSupported.cs

Verifica se existe uma chave nomeada no KSP (provedor de armazenamento de chaves) especificada, de acordo com as opções especificadas.

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

Parâmetros

keyName
String

O nome da chave.

provider
CngProvider

O KSP a ser pesquisado para a chave.

options
CngKeyOpenOptions

Uma combinação bit a bit dos valores de enumeração que especifica opções para abrir uma chave.

Retornos

true se a chave nomeada existir no provedor especificado, caso contrário, false.

Atributos

Exceções

keyName ou provider é null.

A CNG (Cryptography Next Generation) não é compatível com este sistema.

Todos os outros erros.

Comentários

Use essa sobrecarga para marcar a existência de uma chave em um KSP diferente do padrão MicrosoftSoftwareKeyStorageProvidere para especificar opções de abertura de chave.

Aplica-se a