Package net.i2p.router.crypto.ratchet
Class SessionKeyAndNonce
java.lang.Object
net.i2p.data.SimpleDataStructure
net.i2p.data.SessionKey
net.i2p.router.crypto.ratchet.SessionKeyAndNonce
- All Implemented Interfaces:
DataStructure
A session key is 32 bytes of data.
Nonce should be 65535 or less.
This is what is returned from RatchetTagSet.consume().
RatchetSKM puts it in a RatchetEntry and returns it to ECIESAEADEngine.
- 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
ConstructorDescriptionSessionKeyAndNonce
(byte[] data, int nonce) For outbound Existing SessionSessionKeyAndNonce
(byte[] data, int id, int nonce, PublicKey remoteKey) For inbound Existing SessionSessionKeyAndNonce
(HandshakeState state) For New Session Replies -
Method Summary
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, read, readBytes, toBase64, toByteArray, writeBytes
-
Constructor Details
-
SessionKeyAndNonce
public SessionKeyAndNonce(byte[] data, int nonce) For outbound Existing Session -
SessionKeyAndNonce
For inbound Existing Session- Since:
- 0.9.46
-
SessionKeyAndNonce
For New Session Replies
-
-
Method Details
-
getNonce
public int getNonce()For ES, else 0 -
getID
public int getID()For inbound ES, else 0- Since:
- 0.9.46
-
getRemoteKey
For inbound ES, else null. For NSR, use getHansdhakeState().getRemotePublicKey().getPublicKey().- Since:
- 0.9.46
-
getHandshakeState
For inbound NSR only, else null. MUST be cloned before processing NSR. -
toString
- Overrides:
toString
in classSimpleDataStructure
-