public class SessionInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
boolean |
authenticateMessage |
boolean |
encryptMessage |
byte[] |
identityKeyHandle |
int |
identityKeyIndex |
int |
sessionId |
byte[] |
sessionKey |
int |
timeOut |
Constructor and Description |
---|
SessionInfo(int sessionid,
byte[] sessionkey,
byte[] idenHandle,
int idenIndex,
int majorProtocolVersion,
int minorProtocolVersion) |
Modifier and Type | Method and Description |
---|---|
void |
addSessionCounter(int sessionCounter) |
byte[] |
decryptBuffer(byte[] buf,
int offset,
int len)
Decrypt the given buffer using the session key and algorithm that should
have already been set.
|
byte[] |
encryptBuffer(byte[] buf,
int offset,
int len)
Encrypt the given buffer using the session key and algorithm that should
have already been set.
|
boolean |
equals(java.lang.Object obj)
Returns true if the given object is a SessionInfo object with
equivalent parameters.
|
boolean |
getAuthenticateMessageFlag() |
static int |
getDefaultTimeout() |
boolean |
getEncryptedMesssageFlag() |
int |
getEncryptionAlgorithmCode()
Return the algorithm that is being used for encryption in this session.
|
int |
getNextSessionCounter() |
int |
getSessionID() |
byte[] |
getSessionKey() |
int |
getTimeOut() |
boolean |
hasExpired() |
boolean |
isSessionAnonymous() |
void |
setAuthenticateMessageFlag(boolean flag) |
static void |
setDefaultTimeout(int maxSessionTimeout) |
void |
setEncryptedMesssageFlag(boolean flag) |
void |
setEncryptionAlgorithmCode(int algCode)
Set the algorithm that is to be used for encryption in this session.
|
void |
setSessionKey(byte[] sessionkey) |
void |
setTimeOut(int newTimeout) |
void |
touch() |
public int timeOut
public int sessionId
public byte[] sessionKey
public boolean encryptMessage
public boolean authenticateMessage
public byte[] identityKeyHandle
public int identityKeyIndex
public SessionInfo(int sessionid, byte[] sessionkey, byte[] idenHandle, int idenIndex, int majorProtocolVersion, int minorProtocolVersion)
public int getNextSessionCounter()
public void addSessionCounter(int sessionCounter) throws HandleException
HandleException
public int getEncryptionAlgorithmCode()
public void setEncryptionAlgorithmCode(int algCode)
public byte[] encryptBuffer(byte[] buf, int offset, int len) throws HandleException
HandleException
public byte[] decryptBuffer(byte[] buf, int offset, int len) throws HandleException
HandleException
public boolean isSessionAnonymous()
public void setTimeOut(int newTimeout)
public int getTimeOut()
public byte[] getSessionKey()
public void setSessionKey(byte[] sessionkey)
public boolean getEncryptedMesssageFlag()
public boolean getAuthenticateMessageFlag()
public void setEncryptedMesssageFlag(boolean flag)
public void setAuthenticateMessageFlag(boolean flag)
public void touch()
public final boolean hasExpired()
public static void setDefaultTimeout(int maxSessionTimeout)
public static int getDefaultTimeout()
public int getSessionID()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object