Search in sources :

Example 1 with LMOTSPrivateKey

use of de.flexiprovider.pqc.ots.lm.LMOTSPrivateKey in project core by jcryptool.

the class LMOTSPrivateKeyContentProvider method getAlgorithmElements.

@Override
protected List<TableEntry> getAlgorithmElements(Object inputElement) {
    List<TableEntry> paramElements = new ArrayList<TableEntry>();
    try {
        LMOTSPrivateKey key = (LMOTSPrivateKey) inputElement;
        if (key == null)
            return null;
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_k, "" + Arrays.toString(key.getK().toArray())));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_l, "" + Arrays.toString(key.getL().toArray())));
    } catch (ClassCastException e) {
        return null;
    }
    return paramElements;
}
Also used : TableEntry(org.jcryptool.crypto.keystore.ui.dialogs.TableEntry) ArrayList(java.util.ArrayList) LMOTSPrivateKey(de.flexiprovider.pqc.ots.lm.LMOTSPrivateKey)

Aggregations

LMOTSPrivateKey (de.flexiprovider.pqc.ots.lm.LMOTSPrivateKey)1 ArrayList (java.util.ArrayList)1 TableEntry (org.jcryptool.crypto.keystore.ui.dialogs.TableEntry)1