Package net.handle.hdllib
Class SessionInfo
java.lang.Object
net.handle.hdllib.SessionInfo
- Direct Known Subclasses:
ClientSideSessionInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanbooleanbyte[]intintbyte[]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 TypeMethodDescriptionvoidaddSessionCounter(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.booleanbooleanstatic intbooleanintReturn the algorithm that is being used for encryption in this session.bytebyteintintbyte[]intfinal booleaninthashCode()booleanvoidsetAuthenticateMessageFlag(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 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
-