SymmetricAlgorithm.TryDecryptCfb 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.
Attempts to decrypt data into the specified buffer, using CFB mode with the specified padding mode and feedback size.
public bool TryDecryptCfb(ReadOnlySpan<byte> ciphertext, ReadOnlySpan<byte> iv, Span<byte> destination, out int bytesWritten, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.None, int feedbackSizeInBits = 8);
member this.TryDecryptCfb : ReadOnlySpan<byte> * ReadOnlySpan<byte> * Span<byte> * int * System.Security.Cryptography.PaddingMode * int -> bool
Public Function TryDecryptCfb (ciphertext As ReadOnlySpan(Of Byte), iv As ReadOnlySpan(Of Byte), destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional paddingMode As PaddingMode = System.Security.Cryptography.PaddingMode.None, Optional feedbackSizeInBits As Integer = 8) As Boolean
- ciphertext
- ReadOnlySpan<Byte>
The data to decrypt.
- iv
- ReadOnlySpan<Byte>
The initialization vector.
- bytesWritten
- Int32
When this method returns, contains the total number of bytes written to destination
.
- paddingMode
- PaddingMode
The padding mode used to produce the ciphertext and remove during decryption.
- feedbackSizeInBits
- Int32
The feedback size, specified in bits.
true
if destination
was large enough to receive the decrypted data; otherwise, false
.
paddingMode
is not a valid padding mode.
-or-
feedbackSizeInBits
is not positive or represent a whole number of bytes.
iv
is the incorrect length. Callers are expected to pass an initialization vector that is exactly BlockSize in length, converted to bytes (BlockSize / 8
).
The ciphertext could not be decrypted successfully.
-or-
feedbackSizeInBits
is not valid for the algorithm.
This method's behavior is defined by TryDecryptCfbCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32, Int32).
Product | Versions |
---|---|
.NET | 6, 7, 8, 9 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: