Package com.nimbusds.jose
Class KeyLengthException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.nimbusds.jose.JOSEException
-
- com.nimbusds.jose.KeyException
-
- com.nimbusds.jose.KeyLengthException
-
- All Implemented Interfaces:
Serializable
public class KeyLengthException extends KeyException
Key length exception.- Version:
- 205-06-29
- Author:
- Vladimir Dzhuvinov
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description KeyLengthException(int expectedLength, Algorithm alg)
Creates a new key length exception.KeyLengthException(Algorithm alg)
Creates a new key length exception.KeyLengthException(String message)
Creates a new key length exception.
-
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
-
-
-
-
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.
-
-