I use IP, USERID, DATETIME to create security code in my web App. I want to know more information about how to create security code, e.g:
string str="192.168.0.1,myid,20121227,12345";
Then I encrypt a string:
string strC=encrypt(str);
Then string strC is my security code.
Generally you use the good solution.sometime we need to know about content of our key, so as you did use a encryption method (because there is a decryption method for each encryption method)
sometime we just need a key to assign it to our users , so in these cases we can use one-way algorithms like hash.Finally i say you use a good way but i have another offer for your solution(maybe you have keep this offer in your mind).
change you encrypt /decrypt method like this :
this will improve your solution and by these method you can use your key in query string variables
Regard , Ali