Class AS4Encryptor
java.lang.Object
com.helger.phase4.messaging.crypto.AS4Encryptor
Encryption helper
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull DocumentencryptSoapBodyPayload(@NonNull IAS4CryptoFactory aCryptoFactoryCrypt, @NonNull ESoapVersion eSoapVersion, @NonNull Document aDoc, boolean bMustUnderstand, @NonNull AS4CryptParams aCryptParams) Encrypt the SOAP "Body" content.static @NonNull AS4MimeMessageencryptToMimeMessage(@NonNull ESoapVersion eSoapVersion, @NonNull Document aDoc, @NonNull @Nonempty com.helger.collection.commons.ICommonsList<WSS4JAttachment> aAttachments, @NonNull IAS4CryptoFactory aCryptoFactoryCrypt, boolean bMustUnderstand, @NonNull AS4ResourceHelper aResHelper, @NonNull AS4CryptParams aCryptParams)
-
Method Details
-
encryptSoapBodyPayload
public static @NonNull 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
public static @NonNull AS4MimeMessage encryptToMimeMessage(@NonNull ESoapVersion eSoapVersion, @NonNull Document aDoc, @Nonempty @NonNull @Nonempty com.helger.collection.commons.ICommonsList<WSS4JAttachment> aAttachments, @NonNull IAS4CryptoFactory aCryptoFactoryCrypt, boolean bMustUnderstand, @WillNotClose @NonNull AS4ResourceHelper aResHelper, @NonNull AS4CryptParams aCryptParams) throws org.apache.wss4j.common.ext.WSSecurityException - Throws:
org.apache.wss4j.common.ext.WSSecurityException
-