use of de.flexiprovider.nf.iq.iqgq.IQGQPublicKeySpec in project core by jcryptool.
the class IQGQPublicKeyContentProvider method getKeySpecElements.
@Override
protected List<TableEntry> getKeySpecElements(Key key) {
List<TableEntry> paramElements = new ArrayList<TableEntry>();
try {
IQGQKeyFactory keyFactory = new IQGQKeyFactory();
IQGQPublicKeySpec keySpec = (IQGQPublicKeySpec) keyFactory.getKeySpec(key, IQGQPublicKeySpec.class);
if (keySpec == null)
return null;
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_exponent, "" + keySpec.getExponent()));
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_alpha, "" + keySpec.getAlpha()));
paramElements.addAll(getParameters(keySpec));
} catch (ClassCastException e) {
return null;
} catch (InvalidKeySpecException e) {
return null;
}
return paramElements;
}
Aggregations