CngKeyOpenOptions 枚举

定义

指定用于打开密钥的选项。Specifies options for opening a key.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class CngKeyOpenOptions
[System.Flags]
public enum CngKeyOpenOptions
type CngKeyOpenOptions = 
Public Enum CngKeyOpenOptions
继承
CngKeyOpenOptions
属性

字段

MachineKey 32

计算机范围的密钥已打开。A machine-wide key is opened.

None 0

未指定任何密钥打开选项。No key open options are specified.

Silent 64

已取消显示 UI 提示。UI prompting is suppressed.

UserKey 0

如果未指定 MachineKey 值,则打开用户密钥。If the MachineKey value is not specified, a user key is opened instead.

注解

缄默选项禁止显示任何 UI 提示。The Silent option suppresses any UI prompting. 此选项可能不适用于某些密钥类型, 如软件密钥存储提供程序 (KSP) 中存储的智能卡密钥和密钥。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). 这些密钥类型通过强制的 UI 提示进行保护。These key types are protected with mandatory UI prompting.

适用于