Class KeyLengthException

All Implemented Interfaces:
Serializable

public class KeyLengthException extends KeyException
Key length exception.
Version:
205-06-29
Author:
Vladimir Dzhuvinov
See Also:
  • Constructor Details

    • KeyLengthException

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

      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 Details

    • getExpectedKeyLength

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

      Returns the algorithm.
      Returns:
      The JOSE algorithm, null if not specified.