use of de.flexiprovider.api.exceptions.BadPaddingException in project core by jcryptool.
the class CipherEngine method perform.
public void perform(KeyObject usedKey) {
if (initialized) {
// $NON-NLS-1$
LogUtil.logInfo("perfoming cipher");
InputStream inputStream = initInput(operation.getInput());
OutputStream outputStream = initOutput(operation.getOutput());
try {
performCipher(inputStream, outputStream);
inputStream.close();
outputStream.close();
if (operation.getOutput().equals("<Editor>")) {
// $NON-NLS-1$
EditorsManager.getInstance().openNewHexEditor(AbstractEditorService.createOutputFile(new FileInputStream(new File(getOutputURI()))));
}
} catch (IOException e) {
LogUtil.logError(FlexiProviderEnginesPlugin.PLUGIN_ID, "IOException while performing a cipher", e, // $NON-NLS-1$
false);
} catch (IllegalBlockSizeException e) {
LogUtil.logError(FlexiProviderEnginesPlugin.PLUGIN_ID, "IllegalBlockSizeException while performing a cipher", e, // $NON-NLS-1$
true);
} catch (BadPaddingException e) {
// LogUtil.logError(FlexiProviderEnginesPlugin.PLUGIN_ID,
// "BadPaddingException while performing a cipher", e, true); //$NON-NLS-1$
JCTMessageDialog.showInfoDialog(new Status(IStatus.INFO, FlexiProviderEnginesPlugin.PLUGIN_ID, Messages.ExBadPadding, e));
} catch (PartInitException e) {
// $NON-NLS-1$
LogUtil.logError(FlexiProviderEnginesPlugin.PLUGIN_ID, "Failed to open the Hexeditor", e, true);
}
}
}
Aggregations