use of de.flexiprovider.pqc.rainbow.RainbowPrivateKeySpec in project core by jcryptool.
the class RainbowPrivateKeyContentProvider method getKeySpecElements.
@Override
protected List<TableEntry> getKeySpecElements(Key key) {
List<TableEntry> paramElements = new ArrayList<TableEntry>();
try {
RainbowKeyFactory keyFactory = new RainbowKeyFactory();
RainbowPrivateKeySpec keySpec = (RainbowPrivateKeySpec) keyFactory.getKeySpec(key, RainbowPrivateKeySpec.class);
if (keySpec == null)
return null;
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_oidstring, "" + keySpec.getOIDString()));
} catch (ClassCastException e) {
return null;
} catch (InvalidKeySpecException e) {
return null;
}
return paramElements;
}
Aggregations