Class WSSEncryptionProvider

  • All Implemented Interfaces:
    EncryptionProvider

    public class WSSEncryptionProvider
    extends AMEncryptionProvider
    WSSEncryptionProvider is a class for encrypting and decrypting WSS XML Documents which implements AMEncryptionProvider.
    • Constructor Detail

      • WSSEncryptionProvider

        public WSSEncryptionProvider()
        Creates a new instance of WSSEncryptionProvider
    • Method Detail

      • encryptAndReplaceWSSElements

        public Document encryptAndReplaceWSSElements​(Document doc,
                                                     Map elmMap,
                                                     String encDataEncAlg,
                                                     int encDataEncAlgStrength,
                                                     String certAlias,
                                                     int kekStrength,
                                                     String tokenType,
                                                     String providerID)
                                              throws EncryptionException
        Encrypts the given WSS XML element in a given XML Context document.
        Specified by:
        encryptAndReplaceWSSElements in interface EncryptionProvider
        Overrides:
        encryptAndReplaceWSSElements in class AMEncryptionProvider
        Parameters:
        doc - the context XML Document.
        elmMap - Map of (Element, wsu_id) to be encrypted.
        encDataEncAlg - Encryption Key Algorithm.
        encDataEncAlgStrength - Encryption Key Strength.
        certAlias - Key Encryption Key cert alias.
        kekStrength - Key Encryption Key Strength.
        tokenType - Security token type.
        providerID - Provider ID.
        Returns:
        org.w3c.dom.Document XML Document replaced with encrypted data for a given XML element.
        Throws:
        EncryptionException