properties.setEncryptionSymAlgorithm(algorithm);
// Set up the Key Wrapping Key
keygen = KeyGenerator.getInstance("AES");
keygen.init(128);
SecretKey keyWrappingKey = keygen.generateKey();
String wrappingAlgorithm = "http://www.w3.org/2001/04/xmlenc#kw-aes128";
properties.setEncryptionKeyTransportAlgorithm(wrappingAlgorithm);
properties.setEncryptionTransportKey(keyWrappingKey);
SecurePart securePart =