SymmetricAlgorithm.GetCiphertextLengthEcb(Int32, PaddingMode) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the length of a ciphertext with a given padding mode and plaintext length in ECB mode.
public:
int GetCiphertextLengthEcb(int plaintextLength, System::Security::Cryptography::PaddingMode paddingMode);
public int GetCiphertextLengthEcb (int plaintextLength, System.Security.Cryptography.PaddingMode paddingMode);
member this.GetCiphertextLengthEcb : int * System.Security.Cryptography.PaddingMode -> int
Public Function GetCiphertextLengthEcb (plaintextLength As Integer, paddingMode As PaddingMode) As Integer
Parameters
- plaintextLength
- Int32
The plaintext length, in bytes.
- paddingMode
- PaddingMode
The padding mode used to pad the plaintext to the algorithm's block size.
Returns
The length, in bytes, of the ciphertext with padding.
Exceptions
plaintextLength
is a negative number.
-or-
plaintextLength
when padded is too large to represent as a signed 32-bit integer.
-or-
paddingMode
is not a valid padding mode.
BlockSize is not a positive integer.
-or-
BlockSize is not a whole number of bytes. It must be divisible by 8.
The padding mode None was used, but plaintextLength
is not a whole number of blocks.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應