Search in sources :

Example 1 with NiederreiterPrivateKey

use of de.flexiprovider.pqc.ecc.niederreiter.NiederreiterPrivateKey in project core by jcryptool.

the class NiederreiterPrivateKeyContentProvider method getAlgorithmElements.

@Override
protected List<TableEntry> getAlgorithmElements(Object inputElement) {
    List<TableEntry> paramElements = new ArrayList<TableEntry>();
    try {
        NiederreiterPrivateKey key = (NiederreiterPrivateKey) inputElement;
        if (key == null)
            return null;
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_k, "" + key.getK()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_m, "" + key.getM()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_n, "" + key.getN()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_t, "" + key.getT()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_p, "" + key.getP()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_field, "" + key.getField()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_goppapoly, "" + key.getGoppaPoly()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_qinv, "" + key.getQInv()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_sinv, "" + key.getSInv()));
    } catch (ClassCastException e) {
        return null;
    }
    return paramElements;
}
Also used : TableEntry(org.jcryptool.crypto.keystore.ui.dialogs.TableEntry) NiederreiterPrivateKey(de.flexiprovider.pqc.ecc.niederreiter.NiederreiterPrivateKey) ArrayList(java.util.ArrayList)

Aggregations

NiederreiterPrivateKey (de.flexiprovider.pqc.ecc.niederreiter.NiederreiterPrivateKey)1 ArrayList (java.util.ArrayList)1 TableEntry (org.jcryptool.crypto.keystore.ui.dialogs.TableEntry)1