Class SignMessageEncrypter


  • public class SignMessageEncrypter
    extends Object
    Bean for encrypting SignMessage objects.
    Author:
    Martin Lindström (martin.lindstrom@litsec.se)
    • Method Detail

      • encrypt

        public void encrypt​(SignMessage signMessage,
                            String entityID)
                     throws EncryptionException
        Given a sign message holding a cleartext Message element, the method encrypts the message using the default encryption configuration and updates the supplied signMessage so that it holds an EncryptedMessage instead.
        Parameters:
        signMessage - the sign message holding the message to encrypt
        entityID - the SAML entityID of the IdP that is the recipient of the message (and to whom we encrypt for)
        Throws:
        EncryptionException - for errors during encryption
        See Also:
        encrypt(SignMessage, String, EncryptionConfiguration)
      • encrypt

        public void encrypt​(SignMessage signMessage,
                            String entityID,
                            EncryptionConfiguration configuration)
                     throws EncryptionException
        Given a sign message holding a cleartext Message element, the method encrypts the message using the supplied encryption configuration and updates the supplied signMessage so that it holds an EncryptedMessage instead.
        Parameters:
        signMessage - the sign message holding the message to encrypt
        entityID - the SAML entityID of the IdP that is the recipient of the message (and to whom we encrypt for)
        configuration - the encryption configuration to use
        Throws:
        EncryptionException - for errors during encryption