Android Guides | Samples

Javax.Crypto.Cipher.Update Method

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

Syntax

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

Parameters

input
the input bytes to transform.
inputOffset
the offset in the input to start.
inputLen
the length of the input to transform.
output
the output buffer.
outputOffset
the offset in the output buffer.

Exceptions

TypeReason
ShortBufferExceptionif the size of the output buffer is too small.
IllegalStateExceptionif this cipher instance is not initialized for encryption or decryption.
IllegalArgumentExceptionif the input is null, the output is null, or if inputOffset and inputLen do not specify a valid chunk in the input buffer.

Remarks

Continues a multi-part transformation (encryption or decryption). The transformed bytes are stored in the output buffer.

If the size of the output buffer is too small to hold the result, a ShortBufferException is thrown. Use Cipher.GetOutputSize(Int32) to check for the size of the output buffer.

[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