Package net.handle.hdllib
Class SessionInfo
java.lang.Object
net.handle.hdllib.SessionInfo
- Direct Known Subclasses:
ClientSideSessionInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
boolean
byte[]
int
int
byte[]
int
-
Constructor Summary
ConstructorsConstructorDescriptionSessionInfo
(int sessionid, byte[] sessionkey, byte[] idenHandle, int idenIndex, int majorProtocolVersion, int minorProtocolVersion) Deprecated.SessionInfo
(int sessionid, byte[] sessionkey, byte[] idenHandle, int idenIndex, int algorithmCode, int majorProtocolVersion, int minorProtocolVersion) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSessionCounter
(int sessionCounter, boolean enforceUniqueness) 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
boolean
static int
boolean
int
Return the algorithm that is being used for encryption in this session.byte
byte
int
int
byte[]
int
final boolean
int
hashCode()
boolean
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()
-
Field Details
-
timeOut
public int timeOut -
sessionId
public int sessionId -
sessionKey
public byte[] sessionKey -
encryptMessage
public boolean encryptMessage -
authenticateMessage
public boolean authenticateMessage -
identityKeyHandle
public byte[] identityKeyHandle -
identityKeyIndex
public int identityKeyIndex
-
-
Constructor Details
-
SessionInfo
@Deprecated public SessionInfo(int sessionid, byte[] sessionkey, byte[] idenHandle, int idenIndex, int majorProtocolVersion, int minorProtocolVersion) Deprecated. -
SessionInfo
public SessionInfo(int sessionid, byte[] sessionkey, byte[] idenHandle, int idenIndex, int algorithmCode, int majorProtocolVersion, int minorProtocolVersion)
-
-
Method Details
-
getNextSessionCounter
public int getNextSessionCounter() -
addSessionCounter
- Throws:
HandleException
-
getEncryptionAlgorithmCode
public int getEncryptionAlgorithmCode()Return the algorithm that is being used for encryption in this session. Codes include HdlSecurityProvider.ENCRYPT_ALG_DES (the default), HdlSecurityProvider.ENCRYPT_ALG_DESEDE and HdlSecurityProvider.ENCRYPT_ALG_AES -
setEncryptionAlgorithmCode
public void setEncryptionAlgorithmCode(int algCode) Set the algorithm that is to be used for encryption in this session. Codes include HdlSecurityProvider.ENCRYPT_ALG_DES (the default), HdlSecurityProvider.ENCRYPT_ALG_DESEDE and HdlSecurityProvider.ENCRYPT_ALG_AES -
encryptBuffer
Encrypt the given buffer using the session key and algorithm that should have already been set.- Throws:
HandleException
-
decryptBuffer
Decrypt the given buffer using the session key and algorithm that should have already been set.- Throws:
HandleException
-
isSessionAnonymous
public boolean isSessionAnonymous() -
setTimeOut
public void setTimeOut(int newTimeout) -
getTimeOut
public int getTimeOut() -
getSessionKey
public byte[] getSessionKey() -
setSessionKey
public void setSessionKey(byte[] sessionkey) -
getEncryptedMesssageFlag
public boolean getEncryptedMesssageFlag() -
getAuthenticateMessageFlag
public boolean getAuthenticateMessageFlag() -
setEncryptedMesssageFlag
public void setEncryptedMesssageFlag(boolean flag) -
setAuthenticateMessageFlag
public void setAuthenticateMessageFlag(boolean flag) -
getMajorProtocolVersion
public byte getMajorProtocolVersion() -
getMinorProtocolVersion
public byte getMinorProtocolVersion() -
touch
public void touch() -
hasExpired
public final boolean hasExpired() -
setDefaultTimeout
public static void setDefaultTimeout(int maxSessionTimeout) -
getDefaultTimeout
public static int getDefaultTimeout() -
getSessionID
public int getSessionID() -
hashCode
public int hashCode() -
equals
-