Class RatchetSessionTag

java.lang.Object
net.i2p.router.crypto.ratchet.RatchetSessionTag

public class RatchetSessionTag extends Object
8 bytes of random data. Does not extend SessionTag or DataStructure to save space
Since:
0.9.44
  • Field Details

  • Constructor Details

    • RatchetSessionTag

      public RatchetSessionTag(long val)
    • RatchetSessionTag

      public RatchetSessionTag(byte[] val)
      Parameters:
      val - will copy the first 8 bytes. Reference will not be kept.
  • Method Details

    • getData

      public byte[] getData()
      Returns:
      data as a byte array
    • getLong

      public long getLong()
      Returns:
      data as a long value
      Since:
      0.9.46
    • length

      public int length()
    • toBase64

      public String toBase64()
      12 chars
    • hashCode

      public int hashCode()
      We assume the data has enough randomness in it, so use 4 bytes for speed.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object