Class NextSessionKey

java.lang.Object
net.i2p.data.SimpleDataStructure
net.i2p.data.PublicKey
net.i2p.router.crypto.ratchet.NextSessionKey
All Implemented Interfaces:
DataStructure

class NextSessionKey extends PublicKey
A X25519 key and key ID.
Since:
0.9.44
  • Constructor Details

    • NextSessionKey

      public NextSessionKey(byte[] data, int id, boolean isReverse, boolean isRequest)
      Parameters:
      data - non-null
    • NextSessionKey

      public NextSessionKey(int id, boolean isReverse, boolean isRequest)
      Null data, for acks/requests only. Type will be ElG but doesn't matter. Don't call setData().
      Since:
      0.9.46
  • Method Details

    • getID

      public int getID()
    • isReverse

      public boolean isReverse()
      Since:
      0.9.46
    • isRequest

      public boolean isRequest()
      Since:
      0.9.46
    • hashCode

      public int hashCode()
      Description copied from class: SimpleDataStructure
      We assume the data has enough randomness in it, so use the first 4 bytes for speed. If this is not the case, override in the extending class.
      Overrides:
      hashCode in class PublicKey
      Since:
      0.9.46
    • equals

      public boolean equals(Object obj)
      Description copied from class: SimpleDataStructure
      Warning - this returns true for two different classes with the same size and same data, e.g. SessionKey and SessionTag, but you wouldn't put them in the same Set, would you?
      Overrides:
      equals in class PublicKey
      Since:
      0.9.46
    • toString

      public String toString()
      Overrides:
      toString in class PublicKey