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

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

戻り値

Int32

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

例外

plaintextLength は負の値です。

または

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

または

paddingMode は有効なパディング モードではありません。

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

または

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

パディング モード None が使用されましたが plaintextLength 、ブロックの合計数ではありません。

適用対象