SymmetricAlgorithm.GetCiphertextLengthCfb(Int32, PaddingMode, Int32) Method
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 CFB mode.
public int GetCiphertextLengthCfb (int plaintextLength, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.None, int feedbackSizeInBits = 8);
member this.GetCiphertextLengthCfb : int * System.Security.Cryptography.PaddingMode * int -> int
Public Function GetCiphertextLengthCfb (plaintextLength As Integer, Optional paddingMode As PaddingMode = System.Security.Cryptography.PaddingMode.None, Optional feedbackSizeInBits As Integer = 8) As Integer
- plaintextLength
- Int32
The plaintext length, in bytes.
- paddingMode
- PaddingMode
The padding mode used to pad the plaintext to the feedback size.
- feedbackSizeInBits
- Int32
The feedback size, in bits.
The length, in bytes, of the ciphertext with padding.
feedbackSizeInBits
is not a positive number.
-or-
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.
The padding mode None was used, but plaintextLength
is not a whole number of blocks.
-or-
feedbackSizeInBits
is not a whole number of bytes. It must be divisible by 8.
feedbackSizeInBits
accepts any value that is a valid feedback size, regardless if the algorithm
supports the specified feedback size.
Product | Versions |
---|---|
.NET | 6, 7, 8, 9 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: