Class VerificationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
zeroecho.core.err.VerificationException
- All Implemented Interfaces:
Serializable
Exception thrown when a cryptographic signature or digest verification fails.
This exception may carry the calculated value, and optionally the expected
value, to aid in debugging and error reporting. In case of failures
originating from lower-level signature APIs, the original
SignatureException may be wrapped as the cause.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVerificationException(byte[] a) Creates a new exception with only the calculated value.VerificationException(byte[] expected, byte[] a) Creates a new exception with both expected and calculated values.VerificationException(SignatureException e, byte[] a) Creates a new exception that wraps a lower-levelSignatureException. -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
VerificationException
public VerificationException(byte[] a) Creates a new exception with only the calculated value.This form is typically used when there is no known expected value, but the calculated value is still useful for diagnostics.
- Parameters:
a- the calculated value, may benull. A defensive copy is made.
-
VerificationException
public VerificationException(byte[] expected, byte[] a) Creates a new exception with both expected and calculated values.This form is useful when the verification mismatch can be expressed in terms of what was expected versus what was actually obtained.
- Parameters:
expected- the expected value, may benull. A defensive copy is made.a- the calculated value, may benull. A defensive copy is made.
-
VerificationException
Creates a new exception that wraps a lower-levelSignatureException.This form allows the original exception to be preserved while attaching the calculated value that caused the failure.
- Parameters:
e- the original signature exception to wrap, must not benulla- the calculated value, may benull. A defensive copy is made.
-
-
Method Details