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
Key length exception.
- Version:
- 205-06-29
- Author:
- Vladimir Dzhuvinov
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionKeyLengthException(int expectedLength, Algorithm alg) Creates a new key length exception.Creates a new key length exception.KeyLengthException(String message) Creates a new key length exception. -
Method Summary
Modifier and TypeMethodDescriptionReturns the algorithm.intReturns 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 Details
-
KeyLengthException
Creates a new key length exception.- Parameters:
message- The exception message.
-
KeyLengthException
Creates a new key length exception.- Parameters:
alg- The JOSE algorithm,nullif not specified.
-
KeyLengthException
Creates a new key length exception.- Parameters:
expectedLength- The expected key length in bits, zero if not specified.alg- The JOSE algorithm,nullif not specified.
-
-
Method Details
-
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,
nullif not specified.
-