Class AS4Encryptor

java.lang.Object
com.helger.phase4.messaging.crypto.AS4Encryptor

@Immutable public final class AS4Encryptor extends Object
Encryption helper
Author:
Philip Helger
  • 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 be null.
      eSoapVersion - The SOAP version to use. May not be null.
      aDoc - The SOAP XML document to be encrypted. May not be null.
      bMustUnderstand - must understand indicator.
      aCryptParams - Encryption parameter settings. May not be null.
      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