public class MessageAuthenticationException extends ProviderException
This exception is thrown when message authentication for a combined cipher+MAC (e.g. Helix) fails, typically due to a mismatch between the expected MAC and the actual MAC.
Constructor and Description |
---|
MessageAuthenticationException(String message)
Creates a new MessageAuthenticationException with the specified
detail message.
|
MessageAuthenticationException(String message,
byte[] expectedMac,
byte[] actualMac)
Creates a new MessageAuthenticationException with the specified
detail message, and saving the expected and actual MACs for reference.
|
MessageAuthenticationException(String message,
Throwable cause)
Creates a new MessageAuthenticationException with the specified
detail message and cause.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getActualMac()
Returns the MAC that was actually generated.
|
byte[] |
getExpectedMac()
Returns the MAC that was expected to be generated.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public MessageAuthenticationException(String message)
message
- the detail message describing this exceptionpublic MessageAuthenticationException(String message, byte[] expectedMac, byte[] actualMac)
message
- the detail message describing this exceptionexpectedMac
- the MAC that was expected to be generatedactualMac
- the MAC that was actually generatedpublic MessageAuthenticationException(String message, Throwable cause)
message
- the detail message describing this exceptioncause
- the throwable that caused this exception to be thrown, or
null if the cause is nonexistent/unknownCopyright © 2010-2015 Matthew Zipay. All Rights Reserved.