use of de.flexiprovider.pqc.hbc.cmss.CMSSPublicKeySpec in project core by jcryptool.
the class CMSSPublicKeyContentProvider method getKeySpecElements.
@Override
protected List<TableEntry> getKeySpecElements(Key key) {
List<TableEntry> paramElements = new ArrayList<TableEntry>();
try {
CMSSKeyFactory keyFactory = new CMSSKeyFactory();
CMSSPublicKeySpec keySpec = (CMSSPublicKeySpec) keyFactory.getKeySpec(key, CMSSPublicKeySpec.class);
if (keySpec == null)
return null;
paramElements.add(new TableEntry(Messages.ContentProvider_pubkeybytes, // $NON-NLS-2$
"" + Arrays.toString(keySpec.getPubKeyBytes())));
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_oidstring, "" + keySpec.getOIDString()));
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_masks, "" + keySpec.getMasks()));
} catch (ClassCastException e) {
return null;
} catch (InvalidKeySpecException e) {
return null;
}
return paramElements;
}
Aggregations