Share via


SymmetricAlgorithm.GetCiphertextLengthCbc(Int32, PaddingMode) メソッド

定義

指定されたパディング モードと CBC モードのプレーンテキスト長を持つ暗号テキストの長さを取得します。

public int GetCiphertextLengthCbc (int plaintextLength, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.PKCS7);
member this.GetCiphertextLengthCbc : int * System.Security.Cryptography.PaddingMode -> int
Public Function GetCiphertextLengthCbc (plaintextLength As Integer, Optional paddingMode As PaddingMode = System.Security.Cryptography.PaddingMode.PKCS7) As Integer

パラメーター

plaintextLength
Int32

プレーンテキストの長さ (バイト単位)。

paddingMode
PaddingMode

プレーンテキストをアルゴリズムのブロック サイズに埋め込むのに使用されるパディング モード。

戻り値

パディングを含む暗号テキストの長さ (バイト単位)。

例外

plaintextLength は負の値です。

または

plaintextLength 埋め込みが大きすぎて符号付き 32 ビット整数として表す場合。

または

paddingMode が有効な埋め込みモードではありません。

BlockSize が正の整数ではありません。

または

BlockSize はバイトの整数ではありません。 8 で割り切れる必要があります。

埋め込みモード None が使用されましたが plaintextLength 、ブロックの合計数ではありません。

適用対象