Package net.i2p.router.crypto.ratchet
Class SessionKeyAndNonce
- java.lang.Object
-
- net.i2p.data.DataStructureImpl
-
- net.i2p.data.SimpleDataStructure
-
- net.i2p.data.SessionKey
-
- net.i2p.router.crypto.ratchet.SessionKeyAndNonce
-
- All Implemented Interfaces:
Serializable
,DataStructure
class SessionKeyAndNonce extends SessionKey
A session key is 32 bytes of data. Nonce should be 65535 or less.- Since:
- 0.9.44
-
-
Field Summary
-
Fields inherited from class net.i2p.data.SessionKey
INVALID_KEY, KEYSIZE_BYTES
-
Fields inherited from class net.i2p.data.SimpleDataStructure
_data
-
-
Constructor Summary
Constructors Constructor Description SessionKeyAndNonce(byte[] data, int nonce)
For Existing SessionSessionKeyAndNonce(HandshakeState state)
For New Session Replies
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HandshakeState
getHandshakeState()
For inbound NSR only, else null.int
getNonce()
For ES, else 0String
toString()
-
Methods inherited from class net.i2p.data.SessionKey
getPreparedKey, length, setData, setPreparedKey
-
Methods inherited from class net.i2p.data.SimpleDataStructure
calculateHash, equals, fromBase64, fromByteArray, getData, hashCode, readBytes, toBase64, toByteArray, writeBytes
-
Methods inherited from class net.i2p.data.DataStructureImpl
read
-
-
-
-
Constructor Detail
-
SessionKeyAndNonce
public SessionKeyAndNonce(byte[] data, int nonce)
For Existing Session
-
SessionKeyAndNonce
public SessionKeyAndNonce(HandshakeState state)
For New Session Replies
-
-
Method Detail
-
getNonce
public int getNonce()
For ES, else 0
-
getHandshakeState
public HandshakeState getHandshakeState()
For inbound NSR only, else null. MUST be cloned before processing NSR.
-
toString
public String toString()
- Overrides:
toString
in classSimpleDataStructure
-
-