Class SessionInfo

    • 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 HandleException
        Encrypt 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 HandleException
        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()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object