Export (0) Print
Expand All

HashAlgorithm.TransformBlock Method

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

Namespace:  System.Security.Cryptography
Assembly:  mscorlib (in mscorlib.dll)

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

Parameters

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

Return Value

Type: System.Int32
The number of bytes written.

Implements

ICryptoTransform.TransformBlock(Byte[], Int32, Int32, Byte[], Int32)

ExceptionCondition
ArgumentException

inputCount uses an invalid value.

-or-

inputBuffer has an invalid length.

ArgumentNullException

inputBuffer is null.

ArgumentOutOfRangeException

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

ObjectDisposedException

The object has already been disposed.

You must call the TransformBlock method before calling the TransformFinalBlock method. You must call both methods before you retrieve the final hash value.

To retrieve the final hash value after calling the TransformFinalBlock method, get the byte array contained within the Hash property.

Calling the TransformBlock method with different input and output arrays results in an IOException.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft