properties.setEncryptionKey(
getSymmetricKey(encryptionProperties.getEncryptionSymmetricKeyAlgo()));
if (encryptSymmetricKey) {
String userName =
(String)message.getContextualProperty(SecurityConstants.ENCRYPT_USERNAME);
CryptoLoader loader = new CryptoLoader();
Crypto crypto = loader.getCrypto(message,
SecurityConstants.ENCRYPT_CRYPTO,
SecurityConstants.ENCRYPT_PROPERTIES);
userName = SecurityUtils.getUserName(crypto, userName);
if (StringUtils.isEmpty(userName)) {