Search in sources :

Example 1 with NiederreiterPublicKey

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

the class NiederreiterPublicKeyContentProvider method getAlgorithmElements.

@Override
protected List<TableEntry> getAlgorithmElements(Object inputElement) {
    List<TableEntry> paramElements = new ArrayList<TableEntry>();
    try {
        NiederreiterPublicKey key = (NiederreiterPublicKey) 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_n, "" + key.getN()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_t, "" + key.getT()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_h, "" + key.getH()));
    } catch (ClassCastException e) {
        return null;
    }
    return paramElements;
}
Also used : TableEntry(org.jcryptool.crypto.keystore.ui.dialogs.TableEntry) ArrayList(java.util.ArrayList) NiederreiterPublicKey(de.flexiprovider.pqc.ecc.niederreiter.NiederreiterPublicKey)

Aggregations

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