Android Guides | Samples

Javax.Crypto.Cipher.DoFinal Method

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

Syntax

[Android.Runtime.Register("doFinal", "()[B", "")]
public Byte[] DoFinal ()

Exceptions

TypeReason
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.

Remarks

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

Processes any bytes that may 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