Export (0) Print
Expand All

ToBase64Transform.TransformFinalBlock Method

Converts the specified region of the specified byte array to base 64.

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

public byte[] TransformFinalBlock(
	byte[] inputBuffer,
	int inputOffset,
	int inputCount
)

Parameters

inputBuffer
Type: System.Byte[]

The input to convert to base 64.

inputOffset
Type: System.Int32

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

inputCount
Type: System.Int32

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

Return Value

Type: System.Byte[]
The computed base 64 conversion.

Implements

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

ExceptionCondition
ObjectDisposedException

The current ToBase64Transform object has already been disposed.

ArgumentException

The inputBuffer parameter contains an invalid offset length.

-or-

The inputCount parameter contains an invalid value.

ArgumentNullException

The inputBuffer parameter is null.

ArgumentOutOfRangeException

The inputBuffer parameter requires a non-negative number.

The following code example demonstrates how to call the TransformFinalBlock method to transform the final block of data. This code example is part of a larger example provided for the ToBase64Transform class.

outputBytes = base64Transform.TransformFinalBlock(
    inputBytes,
    inputOffset,
    inputBytes.Length - inputOffset);

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft