SymmetricAlgorithm.Padding SymmetricAlgorithm.Padding SymmetricAlgorithm.Padding SymmetricAlgorithm.Padding Property


获取或设置对称算法中使用的填充模式。Gets or sets the padding mode used in the symmetric algorithm.

 virtual property System::Security::Cryptography::PaddingMode Padding { System::Security::Cryptography::PaddingMode get(); void set(System::Security::Cryptography::PaddingMode value); };
public virtual System.Security.Cryptography.PaddingMode Padding { get; set; }
member this.Padding : System.Security.Cryptography.PaddingMode with get, set
Public Overridable Property Padding As PaddingMode


对称算法中使用的填充模式。The padding mode used in the symmetric algorithm. 默认值为 PKCS7The default is PKCS7.


该填充模式不是 PaddingMode 值之一。The padding mode is not one of the PaddingMode values.


大多数纯文本消息执行操作包含的完全填充块的字节数。Most plain text messages do not consist of a number of bytes that completely fill blocks. 通常情况下,没有足够的字节数来填充的最后一个块。Often, there are not enough bytes to fill the last block. 在此情况下,填充字符串添加到文本。When this happens, a padding string is added to the text. 例如,如果块长度为 64 位和最后一个块只包含 40 位,将添加的填充的 24 位。For example, if the block length is 64 bits and the last block contains only 40 bits, 24 bits of padding are added. 请参阅PaddingMode枚举为特定模式的描述。See the PaddingMode enumeration for a description of specific modes.