use of de.flexiprovider.core.mprsa.MpRSAPrivateKey in project core by jcryptool.
the class MpRSAPrivateKeyContentProvider method getAlgorithmElements.
@Override
protected List<TableEntry> getAlgorithmElements(Object inputElement) {
List<TableEntry> paramElements = new ArrayList<TableEntry>();
try {
MpRSAPrivateKey key = (MpRSAPrivateKey) 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_n, "" + key.getN()));
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_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()));
paramElements.add(new TableEntry(Messages.ContentProvider_otherprimeinfos, // $NON-NLS-2$
"" + Arrays.toString(key.getOtherPrimeInfo())));
} catch (ClassCastException e) {
return null;
}
return paramElements;
}
Aggregations