SymmetricAlgorithm.TryEncryptCbcCore メソッド

定義

派生クラスでオーバーライドされると、指定したパディング モードで CBC モードを使用して、指定したバッファーにデータを暗号化しようとします。

protected:
 virtual bool TryEncryptCbcCore(ReadOnlySpan<System::Byte> plaintext, ReadOnlySpan<System::Byte> iv, Span<System::Byte> destination, System::Security::Cryptography::PaddingMode paddingMode, [Runtime::InteropServices::Out] int % bytesWritten);
protected virtual bool TryEncryptCbcCore (ReadOnlySpan<byte> plaintext, ReadOnlySpan<byte> iv, Span<byte> destination, System.Security.Cryptography.PaddingMode paddingMode, out int bytesWritten);
abstract member TryEncryptCbcCore : ReadOnlySpan<byte> * ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.PaddingMode * int -> bool
override this.TryEncryptCbcCore : ReadOnlySpan<byte> * ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.PaddingMode * int -> bool
Protected Overridable Function TryEncryptCbcCore (plaintext As ReadOnlySpan(Of Byte), iv As ReadOnlySpan(Of Byte), destination As Span(Of Byte), paddingMode As PaddingMode, ByRef bytesWritten As Integer) As Boolean

パラメーター

plaintext
ReadOnlySpan<Byte>

暗号化するデータ。

iv
ReadOnlySpan<Byte>

初期化ベクター。

destination
Span<Byte>

暗号テキスト データを受信するバッファー。

paddingMode
PaddingMode

暗号化テキストを生成し、復号化中に削除するために使用されるパディング モード。

bytesWritten
Int32

このメソッドが返されるときに、書き込まれた destination合計バイト数が格納されます。

戻り値

Boolean

true暗号化されたデータfalseを受信するのに十分な大きさだった場合destinationは .

例外

派生クラスは実装を提供していません。

注釈

派生クラスはこれをオーバーライドし、実装を提供する必要があります。

このメソッドの実装では、正確に GetCiphertextLengthCbc(plaintext.Length, paddingMode) バイトを destination 書き込み、これを介して bytesWritten報告する必要があります。

適用対象