Class AbstractJoseAlgorithm

java.lang.Object
se.swedenconnect.security.algorithms.impl.AbstractAlgorithm
se.swedenconnect.security.algorithms.impl.AbstractJoseAlgorithm
All Implemented Interfaces:
Algorithm, JoseAlgorithm
Direct Known Subclasses:
AbstractKeyBasedAlgorithm, MacAlgorithmImpl

public abstract class AbstractJoseAlgorithm extends AbstractAlgorithm implements JoseAlgorithm
Abstract implementation of an JoseAlgorithm.
Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
  • Constructor Details

    • AbstractJoseAlgorithm

      public AbstractJoseAlgorithm(String uri, int order, String jcaName, com.nimbusds.jose.Algorithm joseAlgorithm)
      Constructor.
      Parameters:
      uri - the algorithm URI
      order - the ordering for the algorithm
      jcaName - the JCA name
      joseAlgorithm - the JOSE algorithm (may be null)
    • AbstractJoseAlgorithm

      protected AbstractJoseAlgorithm(String uri)
      Protected constructor used by builders.
      Parameters:
      uri - the algorithm URI
  • Method Details

    • getJoseAlgorithm

      public com.nimbusds.jose.Algorithm getJoseAlgorithm()
      Gets the JOSE (Javascript Object Signing and Encryption) algorithm representation.
      Specified by:
      getJoseAlgorithm in interface JoseAlgorithm
      Returns:
      the JOSE algorithm, or null if no JOSE representation for the algorithm exists
    • setJoseAlgorithm

      protected void setJoseAlgorithm(com.nimbusds.jose.Algorithm joseAlgorithm)
      Sets the JOSE algorithm representation for the algorithm.
      Parameters:
      joseAlgorithm - the JOSE algorithm
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractAlgorithm
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class AbstractAlgorithm
    • toString

      public String toString()
      Overrides:
      toString in class AbstractAlgorithm