use of de.flexiprovider.pqc.hbc.gmss.GMSSPublicKeySpec in project core by jcryptool.
the class GMSSPublicKeyContentProvider method getKeySpecElements.
@Override
protected List<TableEntry> getKeySpecElements(Key key) {
List<TableEntry> paramElements = new ArrayList<TableEntry>();
try {
GMSSKeyFactory keyFactory = new GMSSKeyFactory();
GMSSPublicKeySpec keySpec = (GMSSPublicKeySpec) keyFactory.getKeySpec(key, GMSSPublicKeySpec.class);
if (keySpec == null)
return null;
paramElements.add(new TableEntry(Messages.ContentProvider_publickey, // $NON-NLS-2$
"" + Arrays.toString(keySpec.getPublicKey())));
paramElements.addAll(getParameters(keySpec));
} catch (ClassCastException e) {
return null;
} catch (InvalidKeySpecException e) {
return null;
}
return paramElements;
}
Aggregations