Class 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 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