Package net.i2p.data
Class SessionTag
- java.lang.Object
-
- net.i2p.data.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
-
-
Field Summary
Fields Modifier and Type Field Description static int
BYTE_LENGTH
-
Constructor Summary
Constructors Constructor Description SessionTag()
Instantiate 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
byte[]
getData()
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.int
length()
String
toString()
-
-
-
Field Detail
-
BYTE_LENGTH
public static final int BYTE_LENGTH
- See Also:
- Constant Field Values
-
-
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
-
-