Class KeyLengthException

  • All Implemented Interfaces:
    java.io.Serializable

    public class KeyLengthException
    extends KeyException
    Key length exception.
    Version:
    205-06-29
    Author:
    Vladimir Dzhuvinov
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Algorithm getAlgorithm()
      Returns the algorithm.
      int getExpectedKeyLength()
      Returns the expected key length.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • KeyLengthException

        public KeyLengthException​(java.lang.String message)
        Creates a new key length exception.
        Parameters:
        message - The exception message.
      • KeyLengthException

        public KeyLengthException​(Algorithm alg)
        Creates a new key length exception.
        Parameters:
        alg - The JOSE algorithm, null if not specified.
      • KeyLengthException

        public KeyLengthException​(int expectedLength,
                                  Algorithm alg)
        Creates a new key length exception.
        Parameters:
        expectedLength - The expected key length in bits, zero if not specified.
        alg - The JOSE algorithm, null if not specified.
    • Method Detail

      • getExpectedKeyLength

        public int getExpectedKeyLength()
        Returns the expected key length.
        Returns:
        The expected key length in bits, zero if not specified.
      • getAlgorithm

        public Algorithm getAlgorithm()
        Returns the algorithm.
        Returns:
        The JOSE algorithm, null if not specified.