Breyta

Deila með


CryptoAPITransform.TransformBlock(Byte[], Int32, Int32, Byte[], Int32) Method

Definition

Computes the transformation for the specified region of the input byte array and copies the resulting transformation to the specified region of the output byte array.

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

Parameters

inputBuffer
Byte[]

The input on which to perform the operation on.

inputOffset
Int32

The offset into the input byte array from which to begin using data from.

inputCount
Int32

The number of bytes in the input byte array to use as data.

outputBuffer
Byte[]

The output to which to write the data to.

outputOffset
Int32

The offset into the output byte array from which to begin writing data from.

Returns

The number of bytes written.

Implements

Exceptions

The inputBuffer parameter is null.

-or-

The outputBuffer parameter is null.

The length of the input buffer is less than the sum of the input offset and the input count.

inputOffset is out of range. This parameter requires a non-negative number.

Examples

The following code example demonstrates how to call the TransformBlock method to transform the bytes from currentPosition in the sourceBytes array, writing the bytes to the targetBytes array. This code example is part of a larger example provided for the CryptoAPITransform class.

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

Applies to

See also