System.Security.Cryptography.HashAlgorithm.TransformBlock Method

Computes the hash value for the specified region of the input byte array and copies the specified region of the input byte array to the specified region of the output byte array.

Syntax

public int TransformBlock (byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)

Parameters

inputBuffer
The input to compute the hash code for.
inputOffset
The offset into the input byte array from which to begin using data.
inputCount
The number of bytes in the input byte array to use as data.
outputBuffer
A copy of the part of the input array used to compute the hash code.
outputOffset
The offset into the output byte array from which to begin writing data.

Returns

The number of bytes written.

Remarks

You must call the HashAlgorithm.TransformBlock(Byte[], int, int, Byte[], int) method before calling the HashAlgorithm.TransformFinalBlock(Byte[], int, int) method. You must call both methods before you retrieve the final hash value.

To retrieve the final hash value after calling the HashAlgorithm.TransformFinalBlock(Byte[], int, int) method, get the byte array contained within the HashAlgorithm.Hash property.

Calling the HashAlgorithm.TransformBlock(Byte[], int, int, Byte[], int) method with different input and output arrays results in an System.IO.IOException.

Requirements

Namespace: System.Security.Cryptography
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0