SymmetricAlgorithm.TryDecryptCfb 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
尝试将数据解密到指定的缓冲区,使用具有指定填充模式和反馈大小的 CFB 模式。
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>
要解密的数据。
- iv
- ReadOnlySpan<Byte>
初始化向量。
- bytesWritten
- Int32
此方法返回时,包含写入 到 destination
的字节总数。
- paddingMode
- PaddingMode
用于生成密码文本并在解密期间删除的填充模式。
- feedbackSizeInBits
- Int32
反馈大小(以位为单位)。
返回
true
如果 destination
大小足以接收解密的数据,则为 ;否则为 false
。
例外
iv
长度不正确。 调用方应传递长度恰好 BlockSize 转换为字节 (BlockSize / 8
) 的初始化向量。
注解
此方法的行为由 TryDecryptCfbCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32, Int32)定义。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈