SymmetricAlgorithm.DecryptCfb 方法

定義

多載

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

使用 CFB 模式與指定的填補模式和意見反應大小來解密資料。

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

使用 CFB 模式搭配指定的填補模式和意見反應大小,將資料解密至指定的緩衝區。

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

使用 CFB 模式與指定的填補模式和意見反應大小來解密資料。

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

來源:
SymmetricAlgorithm.cs
來源:
SymmetricAlgorithm.cs
來源:
SymmetricAlgorithm.cs

使用 CFB 模式與指定的填補模式和意見反應大小來解密資料。

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

參數

ciphertext
ReadOnlySpan<Byte>

要解密的資料。

iv
ReadOnlySpan<Byte>

初始化向量。

paddingMode
PaddingMode

用來產生加密文字並在解密期間移除的填補模式。

feedbackSizeInBits
Int32

以位為單位指定的意見反應大小。

傳回

Byte[]

解密的純文字資料。

例外狀況

paddingMode 不是有效的填補模式。

-或-

feedbackSizeInBits 不是正數或表示整數位節。

iv 是不正確的長度。 呼叫端預期會傳遞長度完全相同 BlockSize 的初始化向量,並轉換成位元組 (BlockSize / 8) 。

無法成功解密加密文字。

-或-

意見反應大小對演算法無效。

備註

這個方法的行為是由 TryDecryptCfbCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32, Int32) 所定義。

適用於

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

來源:
SymmetricAlgorithm.cs
來源:
SymmetricAlgorithm.cs
來源:
SymmetricAlgorithm.cs

使用 CFB 模式搭配指定的填補模式和意見反應大小,將資料解密至指定的緩衝區。

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

參數

ciphertext
ReadOnlySpan<Byte>

要解密的資料。

iv
ReadOnlySpan<Byte>

初始化向量。

destination
Span<Byte>

要接收純文字資料的緩衝區。

paddingMode
PaddingMode

用來產生加密文字並在解密期間移除的填補模式。

feedbackSizeInBits
Int32

以位為單位指定的意見反應大小。

傳回

寫入 destination 的總位元組數。

例外狀況

paddingMode 不是有效的填補模式。

-或-

feedbackSizeInBits 不是正數或表示整數位節。

iv 是不正確的長度。 呼叫端預期會傳遞長度完全相同 BlockSize 的初始化向量,並轉換成位元組 (BlockSize / 8) 。

-或-

中的 destination 緩衝區太小,無法保存純文字資料。

無法成功解密加密文字。

-或-

feedbackSizeInBits 對演算法無效。

備註

這個方法的行為是由 TryDecryptCfbCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32, Int32) 所定義。

適用於

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

來源:
SymmetricAlgorithm.cs
來源:
SymmetricAlgorithm.cs
來源:
SymmetricAlgorithm.cs

使用 CFB 模式與指定的填補模式和意見反應大小來解密資料。

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

參數

ciphertext
Byte[]

要解密的資料。

iv
Byte[]

初始化向量。

paddingMode
PaddingMode

用來產生加密文字並在解密期間移除的填補模式。

feedbackSizeInBits
Int32

以位為單位指定的意見反應大小。

傳回

Byte[]

解密的純文字資料。

例外狀況

ciphertextivnull

paddingMode 不是有效的填補模式。

-或-

feedbackSizeInBits 不是正數或表示整數位節。

iv 是不正確的長度。 呼叫端預期會傳遞長度完全相同 BlockSize 的初始化向量,並轉換成位元組 (BlockSize / 8) 。

無法成功解密加密文字。

-或-

意見反應大小對演算法無效。

備註

這個方法的行為是由 TryDecryptCfbCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32, Int32) 所定義。

適用於