fixed possible double call to doFinal().
@@ -89,10 +89,14 @@ private int nextChunk()
throws InvalidCipherTextIOException
{
try
+ {
+ if (!finalized)
{
finalized = true;
return cipher.doFinal();
}
+ return null;
+ }
catch (GeneralSecurityException e)
{
throw new InvalidCipherTextIOException("Error finalising cipher", e);
