Class EncryptionMethodBuilder

java.lang.Object
se.swedenconnect.opensaml.common.builder.AbstractSAMLObjectBuilder<org.opensaml.saml.saml2.metadata.EncryptionMethod>
se.swedenconnect.opensaml.saml2.metadata.build.EncryptionMethodBuilder
All Implemented Interfaces:
SAMLObjectBuilder<org.opensaml.saml.saml2.metadata.EncryptionMethod>

public class EncryptionMethodBuilder extends AbstractSAMLObjectBuilder<org.opensaml.saml.saml2.metadata.EncryptionMethod>
A builder for md:EncryptionMethod elements.
Author:
Martin Lindström (martin@idsec.se)
  • Constructor Details

    • EncryptionMethodBuilder

      public EncryptionMethodBuilder()
  • Method Details

    • builder

      public static EncryptionMethodBuilder builder()
      Creates a new EncryptionMethodBuilder instance.
      Returns:
      a EncryptionMethodBuilder instance
    • encryptionMethod

      public static org.opensaml.saml.saml2.metadata.EncryptionMethod encryptionMethod(String algorithm)
      Utility method that creates a EncryptionMethod element having only its Algorithm attribute assigned.
      Parameters:
      algorithm - the algorithm
      Returns:
      a EncryptionMethod instance
    • encryptionMethod

      public static org.opensaml.saml.saml2.metadata.EncryptionMethod encryptionMethod(String algorithm, Integer keySize)
      Utility method that creates a EncryptionMethod element.
      Parameters:
      algorithm - the algorithm
      keySize - key size (in bits)
      Returns:
      a EncryptionMethod instance
    • getObjectType

      protected Class<org.opensaml.saml.saml2.metadata.EncryptionMethod> getObjectType()
      Returns the object type.
      Specified by:
      getObjectType in class AbstractSAMLObjectBuilder<org.opensaml.saml.saml2.metadata.EncryptionMethod>
      Returns:
      the object type
    • algorithm

      public EncryptionMethodBuilder algorithm(String algorithm)
      Assigns the algorithm.
      Parameters:
      algorithm - the algorithm
      Returns:
      the builder
    • keySize

      public EncryptionMethodBuilder keySize(Integer keySize)
      Assigns the size in bits for the key.
      Parameters:
      keySize - key size
      Returns:
      the builder
    • oAEPparams

      public EncryptionMethodBuilder oAEPparams(String base64Encoding)
      Assigns the OAEP parameters.
      Parameters:
      base64Encoding - the parameters in base64
      Returns:
      the builder