X509KeyUsageFlags X509KeyUsageFlags X509KeyUsageFlags X509KeyUsageFlags Enum


定义可以如何使用证书密钥。Defines how the certificate key can be used. 如果未定义此值,则密钥可用于任何目的。If this value is not defined, the key can be used for any purpose.

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

public enum class X509KeyUsageFlags
public enum X509KeyUsageFlags
type X509KeyUsageFlags = 
Public Enum X509KeyUsageFlags


CrlSign CrlSign CrlSign CrlSign 2

可以使用密钥对证书吊销列表 (CRL) 进行签名。The key can be used to sign a certificate revocation list (CRL).

DataEncipherment DataEncipherment DataEncipherment DataEncipherment 16

密钥可以用于数据加密。The key can be used for data encryption.

DecipherOnly DecipherOnly DecipherOnly DecipherOnly 32768

密钥只能用于解密。The key can be used for decryption only.

DigitalSignature DigitalSignature DigitalSignature DigitalSignature 128

密钥可以用作数字签名。The key can be used as a digital signature.

EncipherOnly EncipherOnly EncipherOnly EncipherOnly 1

密钥只能用于加密。The key can be used for encryption only.

KeyAgreement KeyAgreement KeyAgreement KeyAgreement 8

密钥可以用于确定密钥协议,如使用 Diffie-Hellman 密钥协议算法创建的密钥。The key can be used to determine key agreement, such as a key created using the Diffie-Hellman key agreement algorithm.

KeyCertSign KeyCertSign KeyCertSign KeyCertSign 4

可以使用密钥对证书进行签名。The key can be used to sign certificates.

KeyEncipherment KeyEncipherment KeyEncipherment KeyEncipherment 32

密钥可以用于密钥加密。The key can be used for key encryption.

None None None None 0

无密钥使用参数。No key usage parameters.

NonRepudiation NonRepudiation NonRepudiation NonRepudiation 64

密钥可以用于身份验证。The key can be used for authentication.


此类是一个常用的扩展,映射到默认情况下实现CryptoConfig文件。This class is an implementation of a commonly used extension that is mapped by default to the CryptoConfig file. Extensions属性的X509Certificate2调用类,可以直接使用此类。When the Extensions property of the X509Certificate2 class is invoked, this class can be used directly.