CngKey::Open Method (String^)
Creates an instance of an CngKey object that represents an existing named key.
Assembly: System.Core (in System.Core.dll)
Parameters
- keyName
-
Type:
System::String^
The name of the key.
| Exception | Condition |
|---|---|
| ArgumentNullException | keyName is null. |
| PlatformNotSupportedException | Cryptography Next Generation (CNG) is not supported on this system. |
| CryptographicException | All other errors. |
This overload uses the following defaults:
Key storage provider (KSP): MicrosoftSoftwareKeyStorageProvider. Use the Open(String^, CngProvider^) overload if you want to specify another KSP.
Key open options: CngKeyOpenOptions::None.
for permission to open a key container. Demand value: Demand. Associated enumeration: KeyContainerPermissionFlags::Open
Available since 3.5