use of org.jcryptool.core.operations.dataobject.IDataObject in project core by jcryptool.
the class StartHandler method convert.
public IDataObject convert(ActionItem actionItem) {
IDataObject dataobject = DataObjectConverter.hashtableToProperties(actionItem.getParams(), actionItem.getDataObjectType());
if (dataobject instanceof ClassicDataObject) {
AbstractAlphabet alphabet = AlphabetsManager.getInstance().getAlphabetByName(actionItem.getAlphabet());
((ClassicDataObject) dataobject).setAlphabet(alphabet);
if ("encrypt".equals(actionItem.getActionType())) {
// $NON-NLS-1$
((ClassicDataObject) dataobject).setOpmode(AbstractAlgorithm.ENCRYPT_MODE);
} else if ("decrypt".equals(actionItem.getActionType())) {
// $NON-NLS-1$
((ClassicDataObject) dataobject).setOpmode(AbstractAlgorithm.DECRYPT_MODE);
}
}
return dataobject;
}
Aggregations