// we filled a block
try {
clearText = decryptCipher().doFinal(encryptedBytes);
}
catch (Exception e) {
throw new NSForwardException(e);
}
for (int k = 0; k < _blockSize; k++) {
if (clearText[k] != 0) {
result.write(clearText[k]);
}
}
i = 0;
}
}
if (i != 0) {
for (int j = i; j < _blockSize; j++) {
encryptedBytes[j] = 0;
}
try {
clearText = decryptCipher().doFinal(encryptedBytes);
}
catch (Exception e) {
throw new NSForwardException(e);
}
for (int k = 0; k < _blockSize; k++) {
result.write(clearText[k]);
}
}