Udostępnij za pośrednictwem


ProtectedBuffer.decryptAlignedBlocks method

Decrypts aligned blocks of data. Use getBlockSize to retrieve the minimum block size. Valid data will be written to the outputBuffer from the position up to the limit index.

If this method does not receive aligned blocks an exception will be thrown.

Signature

public int decryptAlignedBlocks(
                                  int startingBlockNumber, 
                                  ByteBuffer inputBuffer, 
                                  ByteBuffer outputBuffer, 
                                  boolean isFinal) 
                              throws ProtectionException

Parameters

Name Datatype Notes
startingBlockNumber
int
The first block
inputBuffer
ByteBuffer
Encrypted data [position, limit]
outputBuffer
ByteBuffer
Buffer required for decryption
isFinal
boolean
Set to true for processing the final chunk of data.

Returns

An int indicating the number of bytes actually written.

Throws

ProtectionException

Defined in

ProtectedBuffer.java

Supported Platforms

Minimum supported OS version
Android 4.0.3 (API level 15)