 					{
 						logger.debug("Storing " + _encryptedDataBuffer.length + " bytes of encrypted data.");
 					}
-				}
-				else// if (amountToRead == input.bytesAvailable)
-				{
-					// Attempt to unpad if our buffer is equally divisible by 16.
-					// It could mean that we've reached the end of the file segment.
-
-					//key.usePadding = true;
 				}
 				
 				// Store our current IV so we can use it do decrypt

				logger.debug("READING " + amountToRead + " OF " + input.bytesAvailable);
			}

			if (_lastSixteenBytes.length > 0)
			{
				_lastSixteenBytes.readBytes(tmpBuffer)
				_lastSixteenBytes.length = 0;
				_lastSixteenBytes.position = 0;
			}

			if(amountToRead > 0)
				input.readBytes( tmpBuffer, tmpBuffer.length, amountToRead);

			if (!_flush)
			{
				tmpBuffer.position = tmpBuffer.length - 16;

				{
					logger.debug("Decrypting " + tmpBuffer.length + " bytes of encrypted data.");
				}
				
				if ( leftoverBytes > 0 )
				{
