Partager via


Cipher.UpdateAAD Method

Definition

Overloads

UpdateAAD(ByteBuffer)

Continues a multi-part update of the Additional Authentication Data (AAD).

UpdateAAD(Byte[])

Continues a multi-part update of the Additional Authentication Data (AAD).

UpdateAAD(Byte[], Int32, Int32)

Continues a multi-part update of the Additional Authentication Data (AAD), using a subset of the provided buffer.

UpdateAAD(ByteBuffer)

Continues a multi-part update of the Additional Authentication Data (AAD).

[Android.Runtime.Register("updateAAD", "(Ljava/nio/ByteBuffer;)V", "")]
public void UpdateAAD (Java.Nio.ByteBuffer? src);
[<Android.Runtime.Register("updateAAD", "(Ljava/nio/ByteBuffer;)V", "")>]
member this.UpdateAAD : Java.Nio.ByteBuffer -> unit

Parameters

src
ByteBuffer

the buffer containing the AAD

Attributes

Exceptions

if this cipher instance is not initialized for encryption or decryption.

if the cipher does not support AEAD

Remarks

Continues a multi-part update of the Additional Authentication Data (AAD).

Calls to this method provide AAD to the cipher when operating in modes such as AEAD (GCM/CCM). If this cipher is operating in either GCM or CCM mode, all AAD must be supplied before beginning operations on the ciphertext (via the update and doFinal methods).

All src.remaining() bytes starting at src.position() are processed. Upon return, the input buffer's position will be equal to its limit; its limit will not have changed.

Added in 1.7.

Java documentation for javax.crypto.Cipher.updateAAD(java.nio.ByteBuffer).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

UpdateAAD(Byte[])

Continues a multi-part update of the Additional Authentication Data (AAD).

[Android.Runtime.Register("updateAAD", "([B)V", "")]
public void UpdateAAD (byte[]? src);
[<Android.Runtime.Register("updateAAD", "([B)V", "")>]
member this.UpdateAAD : byte[] -> unit

Parameters

src
Byte[]

the buffer containing the Additional Authentication Data

Attributes

Exceptions

if this cipher instance is not initialized for encryption or decryption.

if input is null

if the cipher does not support AEAD

Remarks

Continues a multi-part update of the Additional Authentication Data (AAD).

Calls to this method provide AAD to the cipher when operating in modes such as AEAD (GCM/CCM). If this cipher is operating in either GCM or CCM mode, all AAD must be supplied before beginning operations on the ciphertext (via the update and doFinal methods).

Added in 1.7.

Java documentation for javax.crypto.Cipher.updateAAD(byte[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

UpdateAAD(Byte[], Int32, Int32)

Continues a multi-part update of the Additional Authentication Data (AAD), using a subset of the provided buffer.

[Android.Runtime.Register("updateAAD", "([BII)V", "")]
public void UpdateAAD (byte[]? src, int offset, int len);
[<Android.Runtime.Register("updateAAD", "([BII)V", "")>]
member this.UpdateAAD : byte[] * int * int -> unit

Parameters

src
Byte[]

the buffer containing the AAD

offset
Int32

the offset in src where the AAD input starts

len
Int32

the number of AAD bytes

Attributes

Exceptions

if this cipher instance is not initialized for encryption or decryption.

if input is null, or if inputOffset and inputLen do not specify a valid chunk in the input buffer.

if the cipher does not support AEAD

Remarks

Continues a multi-part update of the Additional Authentication Data (AAD), using a subset of the provided buffer.

Calls to this method provide AAD to the cipher when operating in modes such as AEAD (GCM/CCM). If this cipher is operating in either GCM or CCM mode, all AAD must be supplied before beginning operations on the ciphertext (via the update and doFinal methods).

Added in 1.7.

Java documentation for javax.crypto.Cipher.updateAAD(byte[], int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to