CryptoAPITransform.TransformBlock(Byte[], Int32, Int32, Byte[], Int32) メソッド

定義

入力バイト配列の指定した領域の変換を計算し、結果として得られる変換を出力バイト配列の指定した領域にコピーします。

public:
 virtual int TransformBlock(cli::array <System::Byte> ^ inputBuffer, int inputOffset, int inputCount, cli::array <System::Byte> ^ outputBuffer, int outputOffset);
public int TransformBlock (byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset);
abstract member TransformBlock : byte[] * int * int * byte[] * int -> int
override this.TransformBlock : byte[] * int * int * byte[] * int -> int
Public Function TransformBlock (inputBuffer As Byte(), inputOffset As Integer, inputCount As Integer, outputBuffer As Byte(), outputOffset As Integer) As Integer

パラメーター

inputBuffer
Byte[]

操作の実行対象となる入力。

inputOffset
Int32

入力バイト配列内のデータの使用開始位置を示すオフセット。

inputCount
Int32

データとして使用する入力バイト配列内のバイト数。

outputBuffer
Byte[]

データを書き込む先の出力。

outputOffset
Int32

データの書き込みの開始位置を示す出力バイト配列内のオフセット。

戻り値

書き込まれたバイト数。

実装

例外

inputBuffer パラメーターが null です。

または

outputBuffer パラメーターが null です。

入力バッファーの長さが、入力オフセットと入力カウントの合計値より小さい値です。

inputOffset が範囲外です。 このパラメーターには、負数以外を指定する必要があります。

次のコード例では、 メソッドをTransformBlock呼び出して配列内sourceBytesの からcurrentPositionバイトを変換し、バイトを配列に書き込む方法をtargetBytes示します。 このコード例は、CryptoAPITransform クラスのために提供されている大規模な例の一部です。

numBytesRead = cryptoTransform->TransformBlock(
   sourceBytes, currentPosition, inputBlockSize,
   targetBytes, currentPosition );
numBytesRead = cryptoTransform.TransformBlock(
    sourceBytes,
    currentPosition,
    inputBlockSize,
    targetBytes,
    currentPosition);
numBytesRead = cryptoTransform.TransformBlock( _
    sourceBytes, _
    currentPosition, _
    inputBlockSize, _
    targetBytes, _
    currentPosition)

適用対象

こちらもご覧ください