Package com.dracoon.sdk.crypto.internal
Class AesGcmFileDecryptionCipher
java.lang.Object
com.dracoon.sdk.crypto.internal.AesGcmFileCipher
com.dracoon.sdk.crypto.internal.AesGcmFileDecryptionCipher
- All Implemented Interfaces:
FileDecryptionCipher
-
Field Summary
Fields inherited from class com.dracoon.sdk.crypto.internal.AesGcmFileCipher
BLOCK_SIZE, realCipher, TAG_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoFinal(EncryptedDataContainer encData) Completes the decryption and verifies the integrity of decrypted bytes.
After this method is called no further calls ofprocessBytesanddoFinalare possible.processBytes(EncryptedDataContainer encData) Decrypts some bytes.
IMPORTANT!!!: After all encrypted bytes have been processed,doFinalmust be called to complete the decryption.Methods inherited from class com.dracoon.sdk.crypto.internal.AesGcmFileCipher
init, process
-
Constructor Details
-
AesGcmFileDecryptionCipher
- Throws:
CryptoSystemException
-
-
Method Details
-
processBytes
public PlainDataContainer processBytes(EncryptedDataContainer encData) throws IllegalArgumentException, IllegalStateException, CryptoSystemException Description copied from interface:FileDecryptionCipherDecrypts some bytes.
IMPORTANT!!!: After all encrypted bytes have been processed,doFinalmust be called to complete the decryption. As long as the decryption is not finished, the integrity of the decrypted bytes is not guaranteed!- Specified by:
processBytesin interfaceFileDecryptionCipher- Parameters:
encData- The data container with the bytes to decrypt.- Returns:
- The data container with the decrypted bytes.
- Throws:
IllegalArgumentException- If the data container is invalid.IllegalStateException- If the cipher is in an inappropriate state.CryptoSystemException- If a unknown error occurred.
-
doFinal
public PlainDataContainer doFinal(EncryptedDataContainer encData) throws BadFileException, IllegalArgumentException, IllegalStateException, CryptoSystemException Description copied from interface:FileDecryptionCipherCompletes the decryption and verifies the integrity of decrypted bytes.
After this method is called no further calls ofprocessBytesanddoFinalare possible.- Specified by:
doFinalin interfaceFileDecryptionCipher- Parameters:
encData- The data container with the previously calculated tag.- Returns:
- The data container with the decrypted bytes.
- Throws:
BadFileException- If the file content has been modified.IllegalArgumentException- If the data container is invalid.IllegalStateException- If the cipher is in an inappropriate state.CryptoSystemException- If a unknown error occurred.
-