Search in sources :

Example 1 with MeRSAPrivateKey

use of de.flexiprovider.core.mersa.MeRSAPrivateKey in project core by jcryptool.

the class MeRSAPrivateKeyContentProvider method getAlgorithmElements.

@Override
protected List<TableEntry> getAlgorithmElements(Object inputElement) {
    List<TableEntry> paramElements = new ArrayList<TableEntry>();
    try {
        MeRSAPrivateKey key = (MeRSAPrivateKey) inputElement;
        if (key == null)
            return null;
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_crtcoeff, "" + key.getCRTCoeff()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_crtcoefficient, "" + key.getCrtCoefficient()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_d, "" + key.getD()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_dp, "" + key.getDp()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_dq, "" + key.getDq()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_e, "" + key.getE()));
        // $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_p, "" + key.getP()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_q, "" + key.getQ()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_einvp, "" + key.getEInvP()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_modulus, "" + key.getModulus()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_primeexponentp, "" + key.getPrimeExponentP()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_primeexponentq, "" + key.getPrimeExponentQ()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_primep, "" + key.getPrimeP()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_primeq, "" + key.getPrimeQ()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_privateexponent, "" + key.getPrivateExponent()));
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_publicexponent, "" + key.getPublicExponent()));
    } catch (ClassCastException e) {
        return null;
    }
    return paramElements;
}
Also used : TableEntry(org.jcryptool.crypto.keystore.ui.dialogs.TableEntry) MeRSAPrivateKey(de.flexiprovider.core.mersa.MeRSAPrivateKey) ArrayList(java.util.ArrayList)

Aggregations

MeRSAPrivateKey (de.flexiprovider.core.mersa.MeRSAPrivateKey)1 ArrayList (java.util.ArrayList)1 TableEntry (org.jcryptool.crypto.keystore.ui.dialogs.TableEntry)1