SymmetricAlgorithm.Padding 屬性


取得或設定對稱演算法中使用的填補模式。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.