Class AbstractAlgorithm

    • Constructor Detail

      • AbstractAlgorithm

        public AbstractAlgorithm​(String uri,
                                 int order,
                                 String jcaName)
        Constructor.
        Parameters:
        uri - the algorithm URI
        order - the ordering for the algorithm
        jcaName - the JCA name
      • AbstractAlgorithm

        protected AbstractAlgorithm​(String uri)
        Protected constructor used by builders.
        Parameters:
        uri - the algorithm URI
    • Method Detail

      • getUri

        public String getUri()
        Gets the URI representation of the algorithm.
        Specified by:
        getUri in interface Algorithm
        Returns:
        the URI
      • getJcaName

        public String getJcaName()
        Gets the JCA (Java Cryptography Architecture) name.
        Specified by:
        getJcaName in interface Algorithm
        Returns:
        the JCA name
      • getOrder

        public int getOrder()
        Gets the order for an algorithm where a lower order is seen as more preferable than an algorithm with a higher ordering. The ordering is relative to algorithms of the same type, and also other critera such as key or key length material.
        Specified by:
        getOrder in interface Algorithm
        Returns:
        a positive integer
      • setJcaName

        protected void setJcaName​(String jcaName)
        Assigns the JCA name.
        Parameters:
        jcaName - the JCA name
      • setOrder

        protected void setOrder​(int order)
        Assigns the algorithm order.
        Parameters:
        order - the order
      • isBlacklisted

        public boolean isBlacklisted()
        Tells whether this algorithm is black-listed, i.e., configured to not be allowed.
        Specified by:
        isBlacklisted in interface Algorithm
        Returns:
        true if the algorithm is black-listed and false otherwise
      • setBlacklisted

        public void setBlacklisted​(boolean blacklisted)
        Sets whether this algorithm is blacklisted. The default is false.
        Parameters:
        blacklisted - whether this algorithm is blacklisted
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object