use of de.flexiprovider.api.keys.KeySpec in project core by jcryptool.
the class AbstractKeyNodeContentProvider method getKeySpec.
protected KeySpec getKeySpec(Key key) {
try {
KeyFactory keyFactory = Registry.getKeyFactory(key.getAlgorithm());
KeySpec keySpec = keyFactory.getKeySpec(key, AlgorithmParameterSpec.class);
return keySpec;
} catch (NoSuchAlgorithmException e) {
return null;
} catch (InvalidKeySpecException e) {
return null;
}
}
Aggregations