Search in sources :

Example 1 with GMSSParameterset

use of de.flexiprovider.pqc.hbc.gmss.GMSSParameterset in project core by jcryptool.

the class GMSSPublicKeyContentProvider method getParameters.

private List<TableEntry> getParameters(GMSSPublicKeySpec keySpec) {
    GMSSParameterset params = (GMSSParameterset) keySpec.getGMSSParameterset();
    List<TableEntry> paramElements = new ArrayList<TableEntry>();
    // $NON-NLS-2$
    paramElements.add(new TableEntry(Messages.ContentProvider_numoflayers, "" + params.getNumOfLayers()));
    // $NON-NLS-2$
    paramElements.add(new TableEntry(Messages.ContentProvider_k, "" + Arrays.toString(params.getK())));
    paramElements.add(new TableEntry(Messages.ContentProvider_heightoftrees, // $NON-NLS-2$
    "" + Arrays.toString(params.getHeightOfTrees())));
    paramElements.add(new TableEntry(Messages.ContentProvider_winternitzparameter, // $NON-NLS-2$
    "" + Arrays.toString(params.getWinternitzParameter())));
    return paramElements;
}
Also used : TableEntry(org.jcryptool.crypto.keystore.ui.dialogs.TableEntry) ArrayList(java.util.ArrayList) GMSSParameterset(de.flexiprovider.pqc.hbc.gmss.GMSSParameterset)

Example 2 with GMSSParameterset

use of de.flexiprovider.pqc.hbc.gmss.GMSSParameterset in project core by jcryptool.

the class GMSSPrivateKeyContentProvider method getParameters.

private List<TableEntry> getParameters(GMSSPrivateKeySpec keySpec) {
    GMSSParameterset params = (GMSSParameterset) keySpec.getGmssPS();
    List<TableEntry> paramElements = new ArrayList<TableEntry>();
    // $NON-NLS-2$
    paramElements.add(new TableEntry(Messages.ContentProvider_numoflayers, "" + params.getNumOfLayers()));
    // $NON-NLS-2$
    paramElements.add(new TableEntry(Messages.ContentProvider_numoflayers, "" + Arrays.toString(params.getK())));
    paramElements.add(new TableEntry(Messages.ContentProvider_heightoftrees, // $NON-NLS-2$
    "" + Arrays.toString(params.getHeightOfTrees())));
    paramElements.add(new TableEntry(Messages.ContentProvider_winternitzparameter, // $NON-NLS-2$
    "" + Arrays.toString(params.getWinternitzParameter())));
    return paramElements;
}
Also used : TableEntry(org.jcryptool.crypto.keystore.ui.dialogs.TableEntry) ArrayList(java.util.ArrayList) GMSSParameterset(de.flexiprovider.pqc.hbc.gmss.GMSSParameterset)

Aggregations

GMSSParameterset (de.flexiprovider.pqc.hbc.gmss.GMSSParameterset)2 ArrayList (java.util.ArrayList)2 TableEntry (org.jcryptool.crypto.keystore.ui.dialogs.TableEntry)2