添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Access to this page requires authorization. You can try or changing directories . Access to this page requires authorization. You can try changing directories .
[Android.Runtime.Register("doFinal", "()[B", "")]
public byte[]? DoFinal();
[<Android.Runtime.Register("doFinal", "()[B", "")>]
member this.DoFinal : unit -> byte[]

Returns

Remarks

Finishes a multiple-part encryption or decryption operation, depending on how this cipher was initialized.

Input data that may have been buffered during a previous update operation is processed, with padding (if requested) being applied. If an AEAD mode such as GCM/CCM is being used, the authentication tag is appended in the case of encryption, or verified in the case of decryption. The result is stored in a new buffer.

Upon finishing, this method resets this cipher object to the state it was in when previously initialized via a call to init . That is, the object is reset and available to encrypt or decrypt (depending on the operation mode that was specified in the call to init ) more data.

Note: if any exception is thrown, this cipher object may need to be reset before it can be used again.

Java documentation for javax.crypto.Cipher.doFinal() .

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.

[Android.Runtime.Register("doFinal", "([B)[B", "")]
public byte[]? DoFinal(byte[]? input);
[<Android.Runtime.Register("doFinal", "([B)[B", "")>]
member this.DoFinal : byte[] -> byte[]

Parameters

Remarks

Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation. The data is encrypted or decrypted, depending on how this cipher was initialized.

The bytes in the input buffer, and any input bytes that may have been buffered during a previous update operation, are processed, with padding (if requested) being applied. If an AEAD mode such as GCM/CCM is being used, the authentication tag is appended in the case of encryption, or verified in the case of decryption. The result is stored in a new buffer.

Upon finishing, this method resets this cipher object to the state it was in when previously initialized via a call to init . That is, the object is reset and available to encrypt or decrypt (depending on the operation mode that was specified in the call to init ) more data.

Note: if any exception is thrown, this cipher object may need to be reset before it can be used again.

Java documentation for javax.crypto.Cipher.doFinal(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.

[Android.Runtime.Register("doFinal", "(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I", "")]
public int DoFinal(Java.Nio.ByteBuffer? input, Java.Nio.ByteBuffer? output);
[<Android.Runtime.Register("doFinal", "(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I", "")>]
member this.DoFinal : Java.Nio.ByteBuffer * Java.Nio.ByteBuffer -> int

Parameters

Remarks

Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation. The data is encrypted or decrypted, depending on how this cipher was initialized.

All input.remaining() bytes starting at input.position() are processed. If an AEAD mode such as GCM/CCM is being used, the authentication tag is appended in the case of encryption, or verified in the case of decryption. The result is stored in the output buffer. Upon return, the input buffer's position will be equal to its limit; its limit will not have changed. The output buffer's position will have advanced by n, where n is the value returned by this method; the output buffer's limit will not have changed.

If output.remaining() bytes are insufficient to hold the result, a ShortBufferException is thrown. In this case, repeat this call with a larger output buffer. Use #getOutputSize(int) getOutputSize to determine how big the output buffer should be.

Upon finishing, this method resets this cipher object to the state it was in when previously initialized via a call to init . That is, the object is reset and available to encrypt or decrypt (depending on the operation mode that was specified in the call to init ) more data.

Note: if any exception is thrown, this cipher object may need to be reset before it can be used again.

Note: this method should be copy-safe, which means the input and output buffers can reference the same byte array and no unprocessed input data is overwritten when the result is copied into the output buffer.

Added in 1.5.

Java documentation for javax.crypto.Cipher.doFinal(java.nio.ByteBuffer, 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.

[Android.Runtime.Register("doFinal", "([BI)I", "")]
public int DoFinal(byte[]? output, int outputOffset);
[<Android.Runtime.Register("doFinal", "([BI)I", "")>]
member this.DoFinal : byte[] * int -> int

Parameters

Remarks

Finishes a multiple-part encryption or decryption operation, depending on how this cipher was initialized.

Input data that may have been buffered during a previous update operation is processed, with padding (if requested) being applied. If an AEAD mode such as GCM/CCM is being used, the authentication tag is appended in the case of encryption, or verified in the case of decryption. The result is stored in the output buffer, starting at outputOffset inclusive.

If the output buffer is too small to hold the result, a ShortBufferException is thrown. In this case, repeat this call with a larger output buffer. Use #getOutputSize(int) getOutputSize to determine how big the output buffer should be.

Upon finishing, this method resets this cipher object to the state it was in when previously initialized via a call to init . That is, the object is reset and available to encrypt or decrypt (depending on the operation mode that was specified in the call to init ) more data.

Note: if any exception is thrown, this cipher object may need to be reset before it can be used again.

Java documentation for javax.crypto.Cipher.doFinal(byte[], 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.

[Android.Runtime.Register("doFinal", "([BII)[B", "")]
public byte[]? DoFinal(byte[]? input, int inputOffset, int inputLen);
[<Android.Runtime.Register("doFinal", "([BII)[B", "")>]
member this.DoFinal : byte[] * int * int -> byte[]

Parameters

Remarks

Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation. The data is encrypted or decrypted, depending on how this cipher was initialized.

The first inputLen bytes in the input buffer, starting at inputOffset inclusive, and any input bytes that may have been buffered during a previous update operation, are processed, with padding (if requested) being applied. If an AEAD mode such as GCM/CCM is being used, the authentication tag is appended in the case of encryption, or verified in the case of decryption. The result is stored in a new buffer.

Upon finishing, this method resets this cipher object to the state it was in when previously initialized via a call to init . That is, the object is reset and available to encrypt or decrypt (depending on the operation mode that was specified in the call to init ) more data.

Note: if any exception is thrown, this cipher object may need to be reset before it can be used again.

Java documentation for javax.crypto.Cipher.doFinal(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.

[Android.Runtime.Register("doFinal", "([BII[B)I", "")]
public int DoFinal(byte[]? input, int inputOffset, int inputLen, byte[]? output);
[<Android.Runtime.Register("doFinal", "([BII[B)I", "")>]
member this.DoFinal : byte[] * int * int * byte[] -> int

Parameters

Remarks

Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation. The data is encrypted or decrypted, depending on how this cipher was initialized.

The first inputLen bytes in the input buffer, starting at inputOffset inclusive, and any input bytes that may have been buffered during a previous update operation, are processed, with padding (if requested) being applied. If an AEAD mode such as GCM/CCM is being used, the authentication tag is appended in the case of encryption, or verified in the case of decryption. The result is stored in the output buffer.

If the output buffer is too small to hold the result, a ShortBufferException is thrown. In this case, repeat this call with a larger output buffer. Use #getOutputSize(int) getOutputSize to determine how big the output buffer should be.

Upon finishing, this method resets this cipher object to the state it was in when previously initialized via a call to init . That is, the object is reset and available to encrypt or decrypt (depending on the operation mode that was specified in the call to init ) more data.

Note: if any exception is thrown, this cipher object may need to be reset before it can be used again.

Note: this method should be copy-safe, which means the input and output buffers can reference the same byte array and no unprocessed input data is overwritten when the result is copied into the output buffer.

Java documentation for javax.crypto.Cipher.doFinal(byte[], int, int, 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.

[Android.Runtime.Register("doFinal", "([BII[BI)I", "")]
public int DoFinal(byte[]? input, int inputOffset, int inputLen, byte[]? output, int outputOffset);
[<Android.Runtime.Register("doFinal", "([BII[BI)I", "")>]
member this.DoFinal : byte[] * int * int * byte[] * int -> int

Parameters

Remarks

Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation. The data is encrypted or decrypted, depending on how this cipher was initialized.

The first inputLen bytes in the input buffer, starting at inputOffset inclusive, and any input bytes that may have been buffered during a previous update operation, are processed, with padding (if requested) being applied. If an AEAD mode such as GCM/CCM is being used, the authentication tag is appended in the case of encryption, or verified in the case of decryption. The result is stored in the output buffer, starting at outputOffset inclusive.

If the output buffer is too small to hold the result, a ShortBufferException is thrown. In this case, repeat this call with a larger output buffer. Use #getOutputSize(int) getOutputSize to determine how big the output buffer should be.

Upon finishing, this method resets this cipher object to the state it was in when previously initialized via a call to init . That is, the object is reset and available to encrypt or decrypt (depending on the operation mode that was specified in the call to init ) more data.

Note: if any exception is thrown, this cipher object may need to be reset before it can be used again.

Note: this method should be copy-safe, which means the input and output buffers can reference the same byte array and no unprocessed input data is overwritten when the result is copied into the output buffer.

Java documentation for javax.crypto.Cipher.doFinal(byte[], int, int, byte[], 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.