Rfc2898DeriveBytes.Salt 属性

定义

获取或设置操作的密钥 salt 值。Gets or sets the key salt value for the operation.

public:
 property cli::array <System::Byte> ^ Salt { cli::array <System::Byte> ^ get(); void set(cli::array <System::Byte> ^ value); };
public byte[] Salt { get; set; }
member this.Salt : byte[] with get, set
Public Property Salt As Byte()

属性值

Byte[]

操作的密钥 salt 值。The key salt value for the operation.

例外

指定的 salt 大小小于 8 字节。The specified salt size is smaller than 8 bytes.

salt 为 nullThe salt is null.

注解

Salt (一组随机字节)用于使邮件的未经授权解密更难。Salt, a random set of bytes, is used to make unauthorized decrypting of a message more difficult. 字典攻击是一种攻击,攻击者通过将加密的值与以前计算的加密值(最可能的密钥)进行比较来尝试解密加密的消息。A dictionary attack is an attack in which the attacker attempts to decrypt an encrypted message by comparing the encrypted value with previously computed encrypted values for the most likely keys. 在密钥派生之前,在密码末尾引入盐或随机字节,这种攻击的难度更大。This attack is made much more difficult by the introduction of salt, or random bytes, at the end of the password before the key derivation.

适用于