Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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 CBC mode.
public int GetCiphertextLengthCbc(int plaintextLength, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.PKCS7);
member this.GetCiphertextLengthCbc : int * System.Security.Cryptography.PaddingMode -> int
Public Function GetCiphertextLengthCbc (plaintextLength As Integer, Optional paddingMode As PaddingMode = System.Security.Cryptography.PaddingMode.PKCS7) As Integer
The plaintext length, in bytes.
The padding mode used to pad the plaintext to the algorithm's block size.
The length, in bytes, of the ciphertext with padding.
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.
Product | Versions |
---|---|
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in