Package com.github.glusk.srp6_variables
Class SRP6PaddingException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.github.glusk.srp6_variables.SRP6Exception
-
- com.github.glusk.srp6_variables.SRP6PaddingException
-
- All Implemented Interfaces:
Serializable
public final class SRP6PaddingException extends SRP6Exception
An SRP-6 Padding Exception.This exception is thrown when trying to cut off byte sequences returned by
SRP6IntegerVariable.bytes(ByteOrder)to a shorter length instead of zero-padding them to longer ones.For example:
try { new SRP6CustomIntegerVariable( () -> new byte[] {1, 2, 0}, ByteOrder.BIG_ENDIAN ).bytes(ByteOrder.BIG_ENDIAN, 2); } catch (SRP6PaddingException e) { // An exception is thrown! }- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SRP6PaddingException(String reason)Creates a new SRP-6 Padding Exception.
-
Method Summary
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
SRP6PaddingException
public SRP6PaddingException(String reason)
Creates a new SRP-6 Padding Exception.- Parameters:
reason- a brief explanation as to why this exception was raised
-
-