-
Notifications
You must be signed in to change notification settings - Fork 44
Actions View
The Actions view gives you the possibility to record cryptographic actions and to execute them again. Please be aware of the following points during your plug-in development so that your crypto plug-in integrates perfectly into the Actions view.
Every algorithm belongs to a Action class, which extends org.jcryptool.core.operations.algorithm.AbstractAlgorithmAction
. This class does contain (besides some others) an abstract method public void run(IDataObject dataobject)
which must be implemented by the concrete action class.
The configuration basis is the DataObject
, which saves all parameters (settings) from the crypto wizard. The Actions view can only show and work with parameters that are contained in the DataObject.
Classic algorithms are using a ClassicDataObject
, modern algorithms (regardless of their type) are using a ModernDataObject
. Have a look at the following implementation samples. In order to integrate them into your crypto plug-in it is normally sufficient to replace the sample DataObject here with the one from your plug-in.
@Override
public void run(IDataObject dataobject) {
AbstractClassicAlgorithm algorithm = new AdfgvxAlgorithm();
ClassicDataObject d = (ClassicDataObject) dataobject;
algorithm.init(d);
super.finalizeRun(algorithm);
}
@Override
public void run(IDataObject dataobject) {
DragonAlgorithm algorithm = new DragonAlgorithm();
algorithm.dataObject = (SymmetricDataObject) dataobject;
super.finalizeRun(algorithm);
}
Need help? Please visit the public JCT Chatroom or open a new Issue and ask your question. We'll be happy to assist you!