}
Bus bus = m.getExchange().getBus();
try {
Properties props = ResourceUtils.loadProperties(propLoc, bus);
PublicKey pk = CryptoUtils.loadPublicKey(m, props);
JweHeaders headers = new JweHeaders(Algorithm.RSA_OAEP.getJwtName(),
props.getProperty(JSON_WEB_ENCRYPTION_CEK_ALGO_PROP));
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;