Search in sources :

Example 1 with CurveParams

use of de.flexiprovider.ec.parameters.CurveParams in project core by jcryptool.

the class ECPublicKeyContentProvider method getParameters.

private List<TableEntry> getParameters(ECPublicKey key) {
    CurveParams params = (CurveParams) key.getParams();
    List<TableEntry> paramElements = new ArrayList<TableEntry>();
    // $NON-NLS-2$
    paramElements.add(new TableEntry(Messages.ContentProvider_k, "" + params.getK()));
    // $NON-NLS-2$
    paramElements.add(new TableEntry(Messages.ContentProvider_r, "" + params.getR()));
    // $NON-NLS-2$
    paramElements.add(new TableEntry(Messages.ContentProvider_oidstring, "" + params.getOID()));
    // $NON-NLS-2$
    paramElements.add(new TableEntry(Messages.ContentProvider_ellipticcurve, "" + params.getE()));
    // $NON-NLS-2$
    paramElements.add(new TableEntry(Messages.ContentProvider_g, "" + params.getG()));
    // $NON-NLS-2$
    paramElements.add(new TableEntry(Messages.ContentProvider_q, "" + params.getQ()));
    return paramElements;
}
Also used : TableEntry(org.jcryptool.crypto.keystore.ui.dialogs.TableEntry) CurveParams(de.flexiprovider.ec.parameters.CurveParams) ArrayList(java.util.ArrayList)

Example 2 with CurveParams

use of de.flexiprovider.ec.parameters.CurveParams in project core by jcryptool.

the class ECPrivateKeyContentProvider method getParameters.

private List<TableEntry> getParameters(ECPrivateKey key) {
    CurveParams params = (CurveParams) key.getParams();
    List<TableEntry> paramElements = new ArrayList<TableEntry>();
    // $NON-NLS-2$
    paramElements.add(new TableEntry(Messages.ContentProvider_k, "" + params.getK()));
    // $NON-NLS-2$
    paramElements.add(new TableEntry(Messages.ContentProvider_r, "" + params.getR()));
    // $NON-NLS-2$
    paramElements.add(new TableEntry(Messages.ContentProvider_oidstring, "" + params.getOID()));
    // $NON-NLS-2$
    paramElements.add(new TableEntry(Messages.ContentProvider_ellipticcurve, "" + params.getE()));
    // $NON-NLS-2$
    paramElements.add(new TableEntry(Messages.ContentProvider_g, "" + params.getG()));
    // $NON-NLS-2$
    paramElements.add(new TableEntry(Messages.ContentProvider_q, "" + params.getQ()));
    return paramElements;
}
Also used : TableEntry(org.jcryptool.crypto.keystore.ui.dialogs.TableEntry) CurveParams(de.flexiprovider.ec.parameters.CurveParams) ArrayList(java.util.ArrayList)

Aggregations

CurveParams (de.flexiprovider.ec.parameters.CurveParams)2 ArrayList (java.util.ArrayList)2 TableEntry (org.jcryptool.crypto.keystore.ui.dialogs.TableEntry)2