Package net.i2p.data
Class SessionTag
java.lang.Object
net.i2p.data.SessionTag
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
-
Field Summary
-
Constructor Summary
ConstructorDescriptionInstantiate the data array and fill it with random data.SessionTag
(boolean create) Instantiate the data array and fill it with random data.SessionTag
(byte[] val) -
Method Summary
-
Field Details
-
BYTE_LENGTH
public static final int BYTE_LENGTH- See Also:
-
-
Constructor Details
-
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 Details
-
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. -
equals
-
toString
-