AesCng.KeySize AesCng.KeySize AesCng.KeySize AesCng.KeySize Property

定义

获取或设置 AesCng 算法所用密钥的大小(以位为单位)。Gets or sets the size, in bits, of the secret key used by the AesCng algorithm.

public:
 virtual property int KeySize { int get(); void set(int value); };
public override int KeySize { get; set; }
member this.KeySize : int with get, set
Public Overrides Property KeySize As Integer

属性值

AesCng 算法所用密钥的大小(以位为单位)。The size, in bits, of the secret key used by the AesCng algorithm.

注解

如果你已创建AesCng对象使用的现有的保留的密钥和的值设置KeySize属性,将无法再使用持久化的密钥并且将改为使用一个暂时的密钥。If you've created the AesCng object using an existing persisted key and you set the value of the KeySize property, the persisted key will no longer be used and an ephemeral key will be used instead. 如果您需要使用同样,持久化的密钥的新实例AesCng类需要创建。If you need to use the persisted key again, a new instance of AesCng class needs to be created.

适用于