Android Guides | Samples

Javax.Crypto.Cipher.DoFinal Method

Finishes a multi-part transformation (encryption or decryption).

Syntax

[Android.Runtime.Register("doFinal", "([BII[BI)I", "")]
public Int32 DoFinal (Byte[] input, Int32 inputOffset, Int32 inputLen, Byte[] output, Int32 outputOffset)

Parameters

input
the input buffer.
inputOffset
the offset in the input buffer.
inputLen
the length of the input.
output
the output buffer for the transformed bytes.
outputOffset
the offset in the output buffer.

Exceptions

TypeReason
ShortBufferExceptionif the size of the output buffer is too small.
IllegalBlockSizeExceptionif the size of the resulting bytes is not a multiple of the cipher block size.
BadPaddingExceptionif the padding of the data does not match the padding scheme.
IllegalStateExceptionif this cipher instance is not initialized for encryption or decryption.
IllegalArgumentExceptionif inputOffset and inputLen do not specify an valid chunk in the input buffer.

Remarks

Finishes a multi-part transformation (encryption or decryption).

Processes the inputLen bytes in input buffer at inputOffset, and any bytes that have been buffered in previous update calls.

[Android Documentation]

Requirements

Namespace: Javax.Crypto
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1