class RatchetTagSet extends Object implements TagSetHandle
Constructor and Description |
---|
RatchetTagSet(HKDF hkdf,
HandshakeState state,
SessionKey rootKey,
SessionKey data,
long date,
int id)
Outbound NSR Tagset
|
RatchetTagSet(HKDF hkdf,
SessionKey rootKey,
SessionKey data,
long date,
int id)
Outbound ES Tagset
|
RatchetTagSet(HKDF hkdf,
SessionTagListener lsnr,
HandshakeState state,
SessionKey rootKey,
SessionKey data,
long date,
int id,
int minSize,
int maxSize)
Inbound NSR Tagset
|
RatchetTagSet(HKDF hkdf,
SessionTagListener lsnr,
PublicKey remoteKey,
SessionKey rootKey,
SessionKey data,
long date,
int id,
int minSize,
int maxSize)
Inbound ES Tagset
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
SessionKeyAndNonce |
consume(RatchetSessionTag tag)
inbound only
|
RatchetSessionTag |
consumeNext()
For outbound only.
|
SessionKeyAndNonce |
consumeNextKey()
For outbound only.
|
boolean |
getAcked()
For inbound, returns true after first consume() call.
|
SessionKey |
getAssociatedKey()
The identifier for the session.
|
long |
getCreated()
For inbound and outbound: creation time
|
long |
getDate()
For inbound and outbound: last used time
|
HandshakeState |
getHandshakeState()
For inbound/outbound NSR only, else null.
|
int |
getID()
for debugging
|
int |
getOriginalSize()
for debugging
|
PublicKey |
getRemoteKey()
The far-end's public key.
|
int |
remaining()
tags remaining
|
void |
setAcked()
For outbound only, call when we can use it.
|
void |
setDate(long when)
For inbound and outbound: last used time
|
int |
size()
unused tags generated
|
String |
toString() |
public RatchetTagSet(HKDF hkdf, HandshakeState state, SessionKey rootKey, SessionKey data, long date, int id)
date
- For outbound: creation timepublic RatchetTagSet(HKDF hkdf, SessionKey rootKey, SessionKey data, long date, int id)
date
- For outbound: creation timepublic RatchetTagSet(HKDF hkdf, SessionTagListener lsnr, HandshakeState state, SessionKey rootKey, SessionKey data, long date, int id, int minSize, int maxSize)
date
- For inbound: creation timepublic RatchetTagSet(HKDF hkdf, SessionTagListener lsnr, PublicKey remoteKey, SessionKey rootKey, SessionKey data, long date, int id, int minSize, int maxSize)
date
- For inbound: creation timepublic void clear()
public PublicKey getRemoteKey()
public SessionKey getAssociatedKey()
public HandshakeState getHandshakeState()
public long getDate()
public void setDate(long when)
public long getCreated()
public int getOriginalSize()
public int size()
public int remaining()
public SessionKeyAndNonce consume(RatchetSessionTag tag)
public RatchetSessionTag consumeNext()
public SessionKeyAndNonce consumeNextKey()
public void setAcked()
public boolean getAcked()
public int getID()