java.lang.Object
org.apache.xml.security.utils.ElementProxy
org.apache.xml.security.utils.Encryption11ElementProxy
org.apache.xml.security.encryption.keys.content.derivedKey.KeyDerivationMethodImpl
All Implemented Interfaces:
KeyDerivationMethod

public class KeyDerivationMethodImpl extends Encryption11ElementProxy implements KeyDerivationMethod
Class KeyDerivationMethodImpl is an DOM implementation of the KeyDerivationMethod.
  • Field Details

  • Constructor Details

    • KeyDerivationMethodImpl

      public KeyDerivationMethodImpl(Document doc)
      Constructor KeyDerivationMethodImpl creates a new KeyDerivationMethodImpl instance.
      Parameters:
      doc - the Document in which to create the DOM tree
    • KeyDerivationMethodImpl

      public KeyDerivationMethodImpl(Element element, String baseURI) throws XMLSecurityException
      Constructor KeyDerivationMethodImpl from existing XML element.
      Parameters:
      element - the element to use as source
      baseURI - the URI of the resource where the XML instance was stored
      Throws:
      XMLSecurityException - if a parsing error occurs
  • Method Details

    • setAlgorithm

      public void setAlgorithm(String algorithm)
      Sets the Algorithm attribute.
      Parameters:
      algorithm - URI
    • getAlgorithm

      public String getAlgorithm()
      Description copied from interface: KeyDerivationMethod
      Returns the algorithm URI of this KeyDerivationMethod.
      Specified by:
      getAlgorithm in interface KeyDerivationMethod
      Returns:
      the algorithm URI string
    • getKDFParams

      public KDFParams getKDFParams() throws XMLSecurityException
      Method returns the KDFParams object of this KeyDerivationMethod Element. If the KDFParams object is not set/cached, it tries to parse it (and cache it) from the KeyDerivationMethod Element. If the KDFParams cannot be parsed/or the Key derivation function URI is not supported, an XMLSecurityException is thrown.
      Specified by:
      getKDFParams in interface KeyDerivationMethod
      Returns:
      the Key derivation function parameters.
      Throws:
      XMLSecurityException - if the KDFParams cannot be created or the KDF URI is not supported.
    • setKDFParams

      public void setKDFParams(KDFParams kdfParams)
    • getBaseLocalName

      public String getBaseLocalName()
      Description copied from class: ElementProxy
      Returns the localname of the Elements of the sub-class.
      Specified by:
      getBaseLocalName in class ElementProxy
      Returns:
      the localname of the Elements of the sub-class.
    • toString

      public String toString()
      Overrides:
      toString in class Object