Package net.i2p.data

Class SessionTag


  • public class SessionTag
    extends Object
    32 bytes, usually of random data. Not recommended for external use, subject to change. As of 0.9.44, does NOT extend SimpleDataStructure, to save space
    • Constructor Detail

      • SessionTag

        public SessionTag()
        Instantiate the data array and fill it with random data.
      • SessionTag

        public SessionTag​(boolean create)
        Instantiate the data array and fill it with random data.
        Parameters:
        create - ignored as of 0.9.44, assumed true
      • SessionTag

        public SessionTag​(byte[] val)
        Parameters:
        val - as of 0.9.44, non-null
    • Method Detail

      • getData

        public byte[] getData()
      • length

        public int length()
      • hashCode

        public int hashCode()
        SessionTags are generated both locally and by peers, in quantity, and are used as keys in several datastructures (see TransientSessionKeyManager), so we use a secure hashCode function.
        Overrides:
        hashCode in class Object