CngKeyOpenOptions Enumeration


Specifies options for opening a key.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:   System.Security.Cryptography
Assembly:  System.Core (in System.Core.dll)

public enum CngKeyOpenOptions

Member nameDescription

A machine-wide key is opened.


No key open options are specified.


UI prompting is suppressed.


If the MachineKey value is not specified, a user key is opened instead.

The Silent option suppresses any UI prompting. This option may not work with some key types, such as smart card keys and keys that are stored in the software key storage provider (KSP). These key types are protected with mandatory UI prompting.

.NET Framework
Available since 3.5
Return to top