I will bite.
To maintain some semblance of state, you need to identify the user using a key of some type. This key is sent to the browser as a cookie OR via the query string parameters.
Now, verification of this key can occur inside the web server (session) itself or by checking another storage mechanism, usually a database record.
The key itself must be confused using some mechanism. The reason for obfuscation is simply to complicate what values other keys may have if the original user or someone else decides to check the value. For example, if the key is your user ID (not recommended), and you use incremental ints, then it is trivial to guess the other user keys. I want to emphasize that obfuscation (or even direct encryption) key provides absolutely no protection from the captured session. Everything he does makes it difficult to guess the keys of other people's sessions .
However, I believe that the key should not have anything to do with your user ID and, instead, be next to a random value, such as a generated GUID. Quite frankly, the 64-based GUID is at the same level of security as encryption of the user ID + time. It is just that your server has a more intensive computing process than another.
Of course, this key may change for each request. The browser says something, you create a new key and send it back. If the browser sends an outdated key, write it down and drop it back to the login screen. This should prevent re-attacks .. to some extent. However, it introduces other problems, such as using the back button in different browsers. Thus, you may not want to go this route.
However, you cannot depend on the IP address of the client, because the same user can send subsequent requests using a different IP address. You cannot depend on the fingerprint of the browser, because any decent hack tool will capture this and send the same values no matter what they use.
Now, if you really want to do it right, you must enable SSL. Otherwise, you are wasting your time. The whole conversation (from the login screen) must be encrypted. If this is not the case then someone can simply listen to this cookie, immediately play it back and capture the session. The fact is that they do not need to know the values contained in them in order to use them. So all this is hashing, etc. You just have fluff that will increase the load on your server.
I said that I use SSL ?;) This will encrypt the traffic from the beginning of the conversation, and the attacker will not be able to play the same packets as for their own handshake with the server. This means that all you have to do is make sure that any session ID that you use is not valid so that one user cannot accept another session.
So to summarize: the method you posted is a waste of time.
You are much better off getting a $ 10 SSL certificate and using a 64-bit GUID as a session identifier. How you store session information on your server doesn’t matter much ... except in situations with load balancing. At this point, it should be idle and supported by the database server. But this is another question.