The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
CngKey::Exists Method (String^)
.NET Framework (current version)
Checks to see whether a named key exists in the default key storage provider (KSP).
Assembly: System.Core (in System.Core.dll)
Parameters
- keyName
-
Type:
System::String^
The key name.
Return Value
Type: System::Booleantrue if the named key exists in the default KSP; otherwise, false.
| Exception | Condition |
|---|---|
| ArgumentNullException | keyName is null. |
| PlatformNotSupportedException | Cryptography Next Generation (CNG) is not supported on this system. |
| CryptographicException | All other errors. |
The default KSP is MicrosoftSoftwareKeyStorageProvider.
.NET Framework
Available since 3.5
Available since 3.5
Show: