String compression = props.getProperty(JSON_WEB_ENCRYPTION_ZIP_ALGO_PROP);
if (compression != null) {
headers.setZipAlgorithm(compression);
}
return new WrappedKeyJweEncryption(headers, pk);
} catch (SecurityException ex) {
throw ex;
} catch (Exception ex) {
throw new SecurityException(ex);
}