Class KeyLengthException

    • Constructor Detail

      • KeyLengthException

        public KeyLengthException​(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.