Class EntropyImpl

  • All Implemented Interfaces:
    Entropy

    public class EntropyImpl
    extends EntropyType
    implements Entropy
    Implementation of Entropy Interface.
    Author:
    Manveen Kaur
    • Constructor Detail

      • EntropyImpl

        public EntropyImpl()
      • EntropyImpl

        public EntropyImpl​(BinarySecret binarySecret)
      • EntropyImpl

        public EntropyImpl​(EncryptedKey encryptedKey)
    • Method Detail

      • fromElement

        public static EntropyType fromElement​(Element element)
                                       throws WSTrustException
        Constructs a Entropy element from an existing XML block.
        Parameters:
        element - A org.w3c.dom.Element representing DOM tree for Entropy object.
        Throws:
        WSTrustException - if it could not process the org.w3c.dom.Element properly, implying that there is an error in the sender or in the element definition.
      • getEntropyType

        public String getEntropyType()
        Gets the type of the Entropy contents
        Specified by:
        getEntropyType in interface Entropy
      • getBinarySecret

        public BinarySecret getBinarySecret()
        Gets the BinarySecret (if any) inside this Entropy
        Specified by:
        getBinarySecret in interface Entropy
        Returns:
        BinarySecret if set, null otherwise
      • setBinarySecret

        public final void setBinarySecret​(BinarySecret binarySecret)
        Sets the BinarySecret (if any) inside this Entropy
        Specified by:
        setBinarySecret in interface Entropy
      • getEncryptedKey

        public EncryptedKey getEncryptedKey()
        Gets the xenc:EncryptedKey set inside this Entropy instance
        Specified by:
        getEncryptedKey in interface Entropy
        Returns:
        xenc:EncryptedKey if set, null otherwise
      • setEncryptedKey

        public final void setEncryptedKey​(EncryptedKey encryptedKey)
        Sets the xenc:EncryptedKey set inside this Entropy instance
        Specified by:
        setEncryptedKey in interface Entropy