Class XMLCipher.Factory.EncryptionMethodImpl

java.lang.Object
org.apache.xml.security.encryption.XMLCipher.Factory.EncryptionMethodImpl
All Implemented Interfaces:
EncryptionMethod
Enclosing class:
XMLCipher.Factory

private class XMLCipher.Factory.EncryptionMethodImpl extends Object implements EncryptionMethod
  • Field Details

    • algorithm

      private String algorithm
    • keySize

      private int keySize
    • oaepParams

      private byte[] oaepParams
    • encryptionMethodInformation

      private List<Element> encryptionMethodInformation
    • digestAlgorithm

      private String digestAlgorithm
    • mgfAlgorithm

      private String mgfAlgorithm
  • Constructor Details

    • EncryptionMethodImpl

      public EncryptionMethodImpl(String algorithm)
      Constructor.
      Parameters:
      algorithm -
  • Method Details

    • getAlgorithm

      public String getAlgorithm()
      Returns the algorithm applied to the cipher data.
      Specified by:
      getAlgorithm in interface EncryptionMethod
      Returns:
      the encryption algorithm.
    • getKeySize

      public int getKeySize()
      Returns the key size of the key of the algorithm applied to the cipher data.
      Specified by:
      getKeySize in interface EncryptionMethod
      Returns:
      the key size.
    • setKeySize

      public void setKeySize(int size)
      Sets the size of the key of the algorithm applied to the cipher data.
      Specified by:
      setKeySize in interface EncryptionMethod
      Parameters:
      size - the key size.
    • getOAEPparams

      public byte[] getOAEPparams()
      Returns the OAEP parameters of the algorithm applied applied to the cipher data.
      Specified by:
      getOAEPparams in interface EncryptionMethod
      Returns:
      the OAEP parameters.
    • setOAEPparams

      public void setOAEPparams(byte[] params)
      Sets the OAEP parameters.
      Specified by:
      setOAEPparams in interface EncryptionMethod
      Parameters:
      params - the OAEP parameters.
    • setDigestAlgorithm

      public void setDigestAlgorithm(String digestAlgorithm)
      Set the Digest Algorithm to use
      Specified by:
      setDigestAlgorithm in interface EncryptionMethod
      Parameters:
      digestAlgorithm - the Digest Algorithm to use
    • getDigestAlgorithm

      public String getDigestAlgorithm()
      Get the Digest Algorithm to use
      Specified by:
      getDigestAlgorithm in interface EncryptionMethod
      Returns:
      the Digest Algorithm to use
    • setMGFAlgorithm

      public void setMGFAlgorithm(String mgfAlgorithm)
      Set the MGF Algorithm to use
      Specified by:
      setMGFAlgorithm in interface EncryptionMethod
      Parameters:
      mgfAlgorithm - the MGF Algorithm to use
    • getMGFAlgorithm

      public String getMGFAlgorithm()
      Get the MGF Algorithm to use
      Specified by:
      getMGFAlgorithm in interface EncryptionMethod
      Returns:
      the MGF Algorithm to use
    • getEncryptionMethodInformation

      public Iterator<Element> getEncryptionMethodInformation()
      Returns an iterator over all the additional elements contained in the EncryptionMethod.
      Specified by:
      getEncryptionMethodInformation in interface EncryptionMethod
      Returns:
      an Iterator over all the additional information about the EncryptionMethod.
    • addEncryptionMethodInformation

      public void addEncryptionMethodInformation(Element info)
      Adds encryption method information.
      Specified by:
      addEncryptionMethodInformation in interface EncryptionMethod
      Parameters:
      info - additional encryption method information.
    • removeEncryptionMethodInformation

      public void removeEncryptionMethodInformation(Element info)
      Removes encryption method information.
      Specified by:
      removeEncryptionMethodInformation in interface EncryptionMethod
      Parameters:
      info - the information to remove from the EncryptionMethod.
    • toElement

      Element toElement()