Class AS4Encryptor
java.lang.Object
com.helger.phase4.messaging.crypto.AS4Encryptor
Encryption helper
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentencryptSoapBodyPayload(IAS4CryptoFactory aCryptoFactoryCrypt, ESoapVersion eSoapVersion, Document aDoc, boolean bMustUnderstand, AS4CryptParams aCryptParams) Encrypt the SOAP "Body" content.static AS4MimeMessageencryptToMimeMessage(ESoapVersion eSoapVersion, Document aDoc, com.helger.commons.collection.impl.ICommonsList<WSS4JAttachment> aAttachments, IAS4CryptoFactory aCryptoFactoryCrypt, boolean bMustUnderstand, AS4ResourceHelper aResHelper, AS4CryptParams aCryptParams)
-
Method Details
-
encryptSoapBodyPayload
@Nonnull public static Document encryptSoapBodyPayload(@Nonnull IAS4CryptoFactory aCryptoFactoryCrypt, @Nonnull ESoapVersion eSoapVersion, @Nonnull Document aDoc, boolean bMustUnderstand, @Nonnull AS4CryptParams aCryptParams) throws org.apache.wss4j.common.ext.WSSecurityException Encrypt the SOAP "Body" content.- Parameters:
aCryptoFactoryCrypt- Crypto factory to use. May not benull.eSoapVersion- The SOAP version to use. May not benull.aDoc- The SOAP XML document to be encrypted. May not benull.bMustUnderstand- must understand indicator.aCryptParams- Encryption parameter settings. May not benull.- Returns:
- The XML document with the encrypted SOAP "Body".
- Throws:
org.apache.wss4j.common.ext.WSSecurityException- in case of error
-
encryptToMimeMessage
@Nonnull public static AS4MimeMessage encryptToMimeMessage(@Nonnull ESoapVersion eSoapVersion, @Nonnull Document aDoc, @Nonnull @Nonempty com.helger.commons.collection.impl.ICommonsList<WSS4JAttachment> aAttachments, @Nonnull IAS4CryptoFactory aCryptoFactoryCrypt, boolean bMustUnderstand, @Nonnull @WillNotClose AS4ResourceHelper aResHelper, @Nonnull AS4CryptParams aCryptParams) throws org.apache.wss4j.common.ext.WSSecurityException - Throws:
org.apache.wss4j.common.ext.WSSecurityException
-