Editare

Partajați prin


SymmetricAlgorithm.DecryptCfb Method

Definition

Overloads

DecryptCfb(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, PaddingMode, Int32)

Decrypts data using CFB mode with the specified padding mode and feedback size.

DecryptCfb(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)

Decrypts data into the specified buffer, using CFB mode with the specified padding mode and feedback size.

DecryptCfb(Byte[], Byte[], PaddingMode, Int32)

Decrypts data using CFB mode with the specified padding mode and feedback size.

DecryptCfb(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, PaddingMode, Int32)

Source:
SymmetricAlgorithm.cs
Source:
SymmetricAlgorithm.cs
Source:
SymmetricAlgorithm.cs

Decrypts data using CFB mode with the specified padding mode and feedback size.

public byte[] DecryptCfb (ReadOnlySpan<byte> ciphertext, ReadOnlySpan<byte> iv, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.None, int feedbackSizeInBits = 8);
member this.DecryptCfb : ReadOnlySpan<byte> * ReadOnlySpan<byte> * System.Security.Cryptography.PaddingMode * int -> byte[]
Public Function DecryptCfb (ciphertext As ReadOnlySpan(Of Byte), iv As ReadOnlySpan(Of Byte), Optional paddingMode As PaddingMode = System.Security.Cryptography.PaddingMode.None, Optional feedbackSizeInBits As Integer = 8) As Byte()

Parameters

ciphertext
ReadOnlySpan<Byte>

The data to decrypt.

iv
ReadOnlySpan<Byte>

The initialization vector.

paddingMode
PaddingMode

The padding mode used to produce the ciphertext and remove during decryption.

feedbackSizeInBits
Int32

The feedback size, specified in bits.

Returns

Byte[]

The decrypted plaintext data.

Exceptions

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-

The feedback size is not valid for the algorithm.

Remarks

This method's behavior is defined by TryDecryptCfbCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32, Int32).

Applies to

DecryptCfb(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32)

Source:
SymmetricAlgorithm.cs
Source:
SymmetricAlgorithm.cs
Source:
SymmetricAlgorithm.cs

Decrypts data into the specified buffer, using CFB mode with the specified padding mode and feedback size.

public int DecryptCfb (ReadOnlySpan<byte> ciphertext, ReadOnlySpan<byte> iv, Span<byte> destination, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.None, int feedbackSizeInBits = 8);
member this.DecryptCfb : ReadOnlySpan<byte> * ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.PaddingMode * int -> int
Public Function DecryptCfb (ciphertext As ReadOnlySpan(Of Byte), iv As ReadOnlySpan(Of Byte), destination As Span(Of Byte), Optional paddingMode As PaddingMode = System.Security.Cryptography.PaddingMode.None, Optional feedbackSizeInBits As Integer = 8) As Integer

Parameters

ciphertext
ReadOnlySpan<Byte>

The data to decrypt.

iv
ReadOnlySpan<Byte>

The initialization vector.

destination
Span<Byte>

The buffer to receive the plaintext data.

paddingMode
PaddingMode

The padding mode used to produce the ciphertext and remove during decryption.

feedbackSizeInBits
Int32

The feedback size, specified in bits.

Returns

The total number of bytes written to destination.

Exceptions

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).

-or-

The buffer in destination is too small to hold the plaintext data.

The ciphertext could not be decrypted successfully.

-or-

feedbackSizeInBits is not valid for the algorithm.

Remarks

This method's behavior is defined by TryDecryptCfbCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32, Int32).

Applies to

DecryptCfb(Byte[], Byte[], PaddingMode, Int32)

Source:
SymmetricAlgorithm.cs
Source:
SymmetricAlgorithm.cs
Source:
SymmetricAlgorithm.cs

Decrypts data using CFB mode with the specified padding mode and feedback size.

public byte[] DecryptCfb (byte[] ciphertext, byte[] iv, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.None, int feedbackSizeInBits = 8);
member this.DecryptCfb : byte[] * byte[] * System.Security.Cryptography.PaddingMode * int -> byte[]
Public Function DecryptCfb (ciphertext As Byte(), iv As Byte(), Optional paddingMode As PaddingMode = System.Security.Cryptography.PaddingMode.None, Optional feedbackSizeInBits As Integer = 8) As Byte()

Parameters

ciphertext
Byte[]

The data to decrypt.

iv
Byte[]

The initialization vector.

paddingMode
PaddingMode

The padding mode used to produce the ciphertext and remove during decryption.

feedbackSizeInBits
Int32

The feedback size, specified in bits.

Returns

Byte[]

The decrypted plaintext data.

Exceptions

ciphertext or iv is null.

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-

The feedback size is not valid for the algorithm.

Remarks

This method's behavior is defined by TryDecryptCfbCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32, Int32).

Applies to