CngKeyUsages 枚举

定义

指定下一代加密技术 (CNG) 密钥可能用于的加密操作。Specifies the cryptographic operations that a Cryptography Next Generation (CNG) key may be used with.

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

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

字段

AllUsages 16777215

密钥可用于所有目的。The key can be used for all purposes.

Decryption 1

密钥可用于加密和解密。The key can be used for encryption and decryption.

KeyAgreement 4

密钥可用于机密协议生成和密钥交换。The key can be used for secret agreement generation and key exchange.

None 0

没有给密钥分配任何用法值。No usage values are assigned to the key.

Signing 2

密钥可用于签名和验证。The key can be used for signing and verification.

注解

并非所有操作都适用于每个键。Not all operations apply to each key. 例如, 如果设置了解密, 则椭圆曲线数字签名算法 (ECDSA) 密钥不能用于解密。For example, an Elliptic Curve Digital Signature Algorithm (ECDSA) key cannot be used for decryption even if the Decryption usage is set.

适用于