All Implemented Interfaces:
Serializable, Comparable<ByteArray>

class MsgIDextends ByteArray
Used for both incoming and outgoing message IDs.
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Pinned for serialized-form compatibility.
      See Also:
    • MY_TOK_LEN

      private static final int MY_TOK_LEN
      BEP 5: 2 bytes, incremented.
      See Also:
    • MAX_TOK_LEN

      private static final int MAX_TOK_LEN
      Longest token accepted in a message.
      See Also:
  • Constructor Details

    • MsgID

      public MsgID(I2PAppContext ctx)
      Create an outgoing message ID with a random value.
      Parameters:
      ctx - the I2P application context for random number generation
    • MsgID

      public MsgID(byte[] data)
      Create an incoming message ID from received data.
      Parameters:
      data - the message ID bytes
      Throws:
      IllegalArgumentException - if data exceeds maximum length