-
Notifications
You must be signed in to change notification settings - Fork 43
Plug ins
Plug-ins are the smallest executable components to extend JCrypTool (well, actually fragments are even smaller, but cannot be executed alone). In order to deliver a plug-in via an Update Site you have to integrate it into a Feature.
JCrypTool consists of many plug-ins. All core plug-ins are part of the platform itself. Those plug-ins offer for example editors or supporting views like the File Explorer or the Crypto Explorer view.
The bulk of plug-ins are crypto plug-ins, from analysis to visualizations. Almost any of those plug-ins is highly specialized and offers for example the implementation of a certain cryptographic operation.
There are no fixed requirements on how which type of crypto plug-in extends which part of the GUI. Most algorithm plug-ins do use wizards, whereas the rest (analysis, games, visualizations) is available as views. However this decision is up to the developer. No matter which parts will be extended it is essential to stick to the Eclipse recommendations and conventions. This means that there are absolutely no explanations in the wizards' content area. Such explanations belong into the wizards head, longer ones into the context help. Views only contain such explanations in the context help, nowhere else.
We recommend signing all your plug-ins, after all, JCrypTool is an e-learning platform for cryptography!
Besides the actual cryptographic implementation a complete JCrypTool plug-in consists of an online help with detailed information on how to use the plug-in, the cryptographic background of the implementation and context sensitive help. Interactive Cheat Sheets are optional. Every text should be available in German and English. English is a must have, German is optional but strongly recommended. The plug-in should be fully internationalized and contain German and English translations.
Make sure that at the end of development, all files are included in the binary build. Check the build.properties file for that matter and verify that all required files are selected.
JCrypTool supports the operating systems Linux, Mac OS X and Windows. Normally the differences between those systems do not affect the plug-in developer. However, some points, depending on the plug-in, do matter. Resources, like icons or html files of a plug-in, may not contain any spaces in their filename. Use lowercase letters everywhere.
File system access in a file dialog must define a start directory that is available on every system. The JCrypTool default is to use System.getProperty("user.home")
which starts in the user home directory.
Depending on the file size or editor content and the chosen algorithm (key strength, parameters, ...) cryptographic operations may take a while. In case those actions are executed in the UI-Thread the whole JCrypTool will be blocked. And the operation feels much longer than it actually is. Normal Eclipse Commands are executed in the UI-Thread by default. We recommend using a Job
and to swap the operation in a separate task. This way the GUI doesn't block, the user is informed about the progress and can continue to use JCrypTool normally.
Job job = new Job("Jobtitle") {
public IStatus run(final IProgressMonitor monitor) {
try {
// with fixed length and monitor.worked(step); calls
monitor.beginTask("Jobtitle", 5);
// OR with unknown length
monitor.beginTask("Jobtitle", IProgressMonitor.UNKNOWN);
if (monitor.isCanceled()) {
return Status.CANCEL_STATUS;
}
} catch (final Exception ex) {
LogUtil.logError(ex);
} finally {
monitor.done();
}
return Status.OK_STATUS;
}
};
job.setUser(true);
job.schedule();
The File Explorer enables cryptographic operations on files without actually opening them. This way even large files can be encrypted. However the default setting is to open all files prior to the cryptographic operation and afterwards the result. In case of huge files this can result into a significant waiting period until the editor is opened. Because of that users can set some preferences to not open the input file before the cryptographic operation and to not open the resulting file (e.g. the cipher text file) automatically. Plug-in developers can query those settings using the IDs fileExplorerOpenSource
and fileExplorerOpenTarget
. Return value is of type Boolean in each case. We recommend that all crypto plug-ins have a look at those parameters before executing any file operation.
Need help? Please visit the public JCT Chatroom or open a new Issue and ask your question. We'll be happy to assist you!