Package org.drasyl.node.handler.crypto
Class Agreement
- java.lang.Object
-
- org.drasyl.node.handler.crypto.Agreement
-
public abstract class Agreement extends Object
This object represents a session key agreement between two nodes.
-
-
Field Summary
Fields Modifier and Type Field Description static long
RENEW_DIVISOR
-
Constructor Summary
Constructors Constructor Description Agreement()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AgreementId
getAgreementId()
abstract SessionPair
getSessionPair()
abstract long
getStaleAt()
boolean
isRenewable()
boolean
isStale()
static Agreement
of(AgreementId id, SessionPair sessionPair, long staleAt)
-
-
-
Field Detail
-
RENEW_DIVISOR
public static final long RENEW_DIVISOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAgreementId
public abstract AgreementId getAgreementId()
-
getSessionPair
public abstract SessionPair getSessionPair()
-
getStaleAt
public abstract long getStaleAt()
- Returns:
- negative value means no stale (only for long time agreement)
-
isStale
public boolean isStale()
-
isRenewable
public boolean isRenewable()
-
of
public static Agreement of(AgreementId id, SessionPair sessionPair, long staleAt)
-
-