keyCipher.init(XMLCipher.WRAP_MODE, keyEncryptionKey);
encrypt(exchange, document, stream, dataEncryptionKey, keyCipher);
}
private void encryptSymmetric(Exchange exchange, Document document, OutputStream stream) throws Exception {
Key keyEncryptionKey;
Key dataEncryptionKey;
if (xmlCipherAlgorithm.equals(XMLCipher.TRIPLEDES)) {
keyEncryptionKey = generateKeyEncryptionKey("DESede");
dataEncryptionKey = generateDataEncryptionKey();
} else if (xmlCipherAlgorithm.equals(XMLCipher.SEED_128)) {
keyEncryptionKey = generateKeyEncryptionKey("SEED");