XMLCipher xmlCipher = XMLCipher.getInstance(dalg);
xmlCipher.init(XMLCipher.ENCRYPT_MODE, dek);
if (includeki && kek != null && dek != null) {
XMLCipher keyCipher = XMLCipher.getInstance(kalg);
keyCipher.init(XMLCipher.WRAP_MODE, kek);
enckey = keyCipher.encryptKey(dom, dek);
EncryptedData encdata = xmlCipher.getEncryptedData();
KeyInfo keyInfo = new KeyInfo(dom);
keyInfo.add(enckey);
encdata.setKeyInfo(keyInfo);
}