Package net.i2p.router.crypto.ratchet
Class RatchetSessionTag
- java.lang.Object
-
- net.i2p.router.crypto.ratchet.RatchetSessionTag
-
public class RatchetSessionTag extends Object
8 bytes, usually of random data. Does not extend SessionTag or DataStructure to save space- Since:
- 0.9.44
-
-
Field Summary
Fields Modifier and Type Field Description static int
LENGTH
-
Constructor Summary
Constructors Constructor Description RatchetSessionTag(byte[] val)
RatchetSessionTag(long val)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Warning - this returns true for two different classes with the same size and same data, e.g.byte[]
getData()
int
hashCode()
We assume the data has enough randomness in it, so use the first 4 bytes for speed.int
length()
String
toBase64()
String
toString()
-
-
-
Field Detail
-
LENGTH
public static final int LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getData
public byte[] getData()
-
length
public int length()
-
toBase64
public String toBase64()
-
hashCode
public int hashCode()
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.
-
equals
public boolean equals(Object obj)
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?
-
-