Package net.handle.hdllib
Class SessionInfo
- java.lang.Object
 - 
- net.handle.hdllib.SessionInfo
 
 
- 
- Direct Known Subclasses:
 ClientSideSessionInfo
public class SessionInfo extends java.lang.Object 
- 
- 
Field Summary
Fields Modifier and Type Field Description booleanauthenticateMessagebooleanencryptMessagebyte[]identityKeyHandleintidentityKeyIndexintsessionIdbyte[]sessionKeyinttimeOut 
- 
Constructor Summary
Constructors Constructor Description SessionInfo(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSessionCounter(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.booleanequals(java.lang.Object obj)booleangetAuthenticateMessageFlag()static intgetDefaultTimeout()booleangetEncryptedMesssageFlag()intgetEncryptionAlgorithmCode()Return the algorithm that is being used for encryption in this session.bytegetMajorProtocolVersion()bytegetMinorProtocolVersion()intgetNextSessionCounter()intgetSessionID()byte[]getSessionKey()intgetTimeOut()booleanhasExpired()inthashCode()booleanisSessionAnonymous()voidsetAuthenticateMessageFlag(boolean flag)static voidsetDefaultTimeout(int maxSessionTimeout)voidsetEncryptedMesssageFlag(boolean flag)voidsetEncryptionAlgorithmCode(int algCode)Set the algorithm that is to be used for encryption in this session.voidsetSessionKey(byte[] sessionkey)voidsetTimeOut(int newTimeout)voidtouch() 
 - 
 
- 
- 
Field Detail
- 
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 Detail
- 
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 Detail
- 
getNextSessionCounter
public int getNextSessionCounter()
 
- 
addSessionCounter
public void addSessionCounter(int sessionCounter, boolean enforceUniqueness) throws HandleException- 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
public byte[] encryptBuffer(byte[] buf, int offset, int len) throws HandleExceptionEncrypt the given buffer using the session key and algorithm that should have already been set.- Throws:
 HandleException
 
- 
decryptBuffer
public byte[] decryptBuffer(byte[] buf, int offset, int len) throws HandleExceptionDecrypt 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()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
equals
public boolean equals(java.lang.Object obj)
- Overrides:
 equalsin classjava.lang.Object
 
 - 
 
 -