/** * Encrypts the DOM representation of the content of an XMLObject, encrypts the encryption key using the specified * key encryption parameters and places the resulting EncryptedKey(s) within the EncryptedData's KeyInfo.. * * @param xmlObject the XMLObject to be encrypted * @param encParams parameters for encrypting the data * @param kekParamsList parameters for encrypting the encryption key * * @return the resulting EncryptedData element * @throws EncryptionException exception thrown on encryption errors */ public EncryptedData encryptElementContent(XMLObject xmlObject, EncryptionParameters encParams, List<KeyEncryptionParameters> kekParamsList) throws EncryptionException { return encryptElement(xmlObject, encParams, kekParamsList, true); }
/** * Encrypts the DOM representation of the content of an XMLObject, encrypts the encryption key using the specified * key encryption parameters and places the resulting EncryptedKey(s) within the EncryptedData's KeyInfo.. * * @param xmlObject the XMLObject to be encrypted * @param encParams parameters for encrypting the data * @param kekParamsList parameters for encrypting the encryption key * * @return the resulting EncryptedData element * @throws EncryptionException exception thrown on encryption errors */ public EncryptedData encryptElementContent(XMLObject xmlObject, EncryptionParameters encParams, List<KeyEncryptionParameters> kekParamsList) throws EncryptionException { return encryptElement(xmlObject, encParams, kekParamsList, true); }
/** * Encrypts the DOM representation of the XMLObject, encrypts the encryption key using the specified key encryption * parameters and places the resulting EncryptedKey(s) within the EncryptedData's KeyInfo. * * @param xmlObject the XMLObject to be encrypted * @param encParams parameters for encrypting the data * @param kekParamsList parameters for encrypting the encryption key * * @return the resulting EncryptedData element * @throws EncryptionException exception thrown on encryption errors */ public EncryptedData encryptElement(XMLObject xmlObject, EncryptionParameters encParams, List<KeyEncryptionParameters> kekParamsList) throws EncryptionException { return encryptElement(xmlObject, encParams, kekParamsList, false); }
/** * Encrypts the DOM representation of the XMLObject, encrypts the encryption key using the specified key encryption * parameters and places the resulting EncryptedKey(s) within the EncryptedData's KeyInfo. * * @param xmlObject the XMLObject to be encrypted * @param encParams parameters for encrypting the data * @param kekParamsList parameters for encrypting the encryption key * * @return the resulting EncryptedData element * @throws EncryptionException exception thrown on encryption errors */ public EncryptedData encryptElement(XMLObject xmlObject, EncryptionParameters encParams, List<KeyEncryptionParameters> kekParamsList) throws EncryptionException { return encryptElement(xmlObject, encParams, kekParamsList, false); }
/** * Encrypts the DOM representation of the content of an XMLObject. * * @param xmlObject the XMLObject to be encrypted * @param encParams parameters for encrypting the data * * @return the resulting EncryptedData element * @throws EncryptionException exception thrown on encryption errors */ public EncryptedData encryptElementContent(XMLObject xmlObject, EncryptionParameters encParams) throws EncryptionException { List<KeyEncryptionParameters> emptyKEKParamsList = new ArrayList<KeyEncryptionParameters>(); return encryptElement(xmlObject, encParams, emptyKEKParamsList, true); }
/** * Encrypts the DOM representation of the XMLObject. * * @param xmlObject the XMLObject to be encrypted * @param encParams parameters for encrypting the data * * @return the resulting EncryptedData element * @throws EncryptionException exception thrown on encryption errors */ public EncryptedData encryptElement(XMLObject xmlObject, EncryptionParameters encParams) throws EncryptionException { List<KeyEncryptionParameters> emptyKEKParamsList = new ArrayList<KeyEncryptionParameters>(); return encryptElement(xmlObject, encParams, emptyKEKParamsList, false); }
/** * Encrypts the DOM representation of the content of an XMLObject. * * @param xmlObject the XMLObject to be encrypted * @param encParams parameters for encrypting the data * * @return the resulting EncryptedData element * @throws EncryptionException exception thrown on encryption errors */ public EncryptedData encryptElementContent(XMLObject xmlObject, EncryptionParameters encParams) throws EncryptionException { List<KeyEncryptionParameters> emptyKEKParamsList = new ArrayList<KeyEncryptionParameters>(); return encryptElement(xmlObject, encParams, emptyKEKParamsList, true); }
/** * Encrypts the DOM representation of the XMLObject. * * @param xmlObject the XMLObject to be encrypted * @param encParams parameters for encrypting the data * * @return the resulting EncryptedData element * @throws EncryptionException exception thrown on encryption errors */ public EncryptedData encryptElement(XMLObject xmlObject, EncryptionParameters encParams) throws EncryptionException { List<KeyEncryptionParameters> emptyKEKParamsList = new ArrayList<KeyEncryptionParameters>(); return encryptElement(xmlObject, encParams, emptyKEKParamsList, false); }
/** * Encrypts the DOM representation of the content of an XMLObject, encrypts the encryption key using the specified * key encryption parameters and places the resulting EncryptedKey within the EncryptedData's KeyInfo.. * * @param xmlObject the XMLObject to be encrypted * @param encParams parameters for encrypting the data * @param kekParams parameters for encrypting the encryption key * * @return the resulting EncryptedData element * @throws EncryptionException exception thrown on encryption errors */ public EncryptedData encryptElementContent(XMLObject xmlObject, EncryptionParameters encParams, KeyEncryptionParameters kekParams) throws EncryptionException { List<KeyEncryptionParameters> kekParamsList = new ArrayList<KeyEncryptionParameters>(); kekParamsList.add(kekParams); return encryptElement(xmlObject, encParams, kekParamsList, true); }
/** * Encrypts the DOM representation of the XMLObject, encrypts the encryption key using the specified key encryption * parameters and places the resulting EncryptedKey within the EncryptedData's KeyInfo. * * @param xmlObject the XMLObject to be encrypted * @param encParams parameters for encrypting the data * @param kekParams parameters for encrypting the encryption key * * @return the resulting EncryptedData element * @throws EncryptionException exception thrown on encryption errors */ public EncryptedData encryptElement(XMLObject xmlObject, EncryptionParameters encParams, KeyEncryptionParameters kekParams) throws EncryptionException { List<KeyEncryptionParameters> kekParamsList = new ArrayList<KeyEncryptionParameters>(); kekParamsList.add(kekParams); return encryptElement(xmlObject, encParams, kekParamsList, false); }
/** * Encrypts the DOM representation of the content of an XMLObject, encrypts the encryption key using the specified * key encryption parameters and places the resulting EncryptedKey within the EncryptedData's KeyInfo.. * * @param xmlObject the XMLObject to be encrypted * @param encParams parameters for encrypting the data * @param kekParams parameters for encrypting the encryption key * * @return the resulting EncryptedData element * @throws EncryptionException exception thrown on encryption errors */ public EncryptedData encryptElementContent(XMLObject xmlObject, EncryptionParameters encParams, KeyEncryptionParameters kekParams) throws EncryptionException { List<KeyEncryptionParameters> kekParamsList = new ArrayList<KeyEncryptionParameters>(); kekParamsList.add(kekParams); return encryptElement(xmlObject, encParams, kekParamsList, true); }
/** * Encrypts the DOM representation of the XMLObject, encrypts the encryption key using the specified key encryption * parameters and places the resulting EncryptedKey within the EncryptedData's KeyInfo. * * @param xmlObject the XMLObject to be encrypted * @param encParams parameters for encrypting the data * @param kekParams parameters for encrypting the encryption key * * @return the resulting EncryptedData element * @throws EncryptionException exception thrown on encryption errors */ public EncryptedData encryptElement(XMLObject xmlObject, EncryptionParameters encParams, KeyEncryptionParameters kekParams) throws EncryptionException { List<KeyEncryptionParameters> kekParamsList = new ArrayList<KeyEncryptionParameters>(); kekParamsList.add(kekParams); return encryptElement(xmlObject, encParams, kekParamsList, false); }
EncryptedData encryptedData = encryptElement(xmlObject, encryptionKey, encryptionAlgorithmURI, encryptContentMode); Document ownerDocument = encryptedData.getDOM().getOwnerDocument();
EncryptedData encryptedData = encryptElement(xmlObject, encryptionKey, encryptionAlgorithmURI, encryptContentMode); Document ownerDocument = encryptedData.getDOM().getOwnerDocument();