Sensitive query string data scrambling
Posted: Fri Aug 20, 2010 1:37 pm
I need to scamble a user Id in the query string.
When a user signs up for my website I send them out a verification email. They need to click on a link in their email to verify their email address.
In the email there is a message lke this.
Now being a newb I figured I could just md5, sha1 it then reverse md5, and sha1 it.
Now I realize md5 is a hash algorithm and can't be reversed. It can only be used to compare against that hash value.
So what kind of function would I use to encrypt it on one side, and decrypt the value when I need to use it.
Or am I going about this verification progress completely wrong? Can anyone point me in the right direction.
When a user signs up for my website I send them out a verification email. They need to click on a link in their email to verify their email address.
In the email there is a message lke this.
Code: Select all
$message = "To verify your account please click this " . SITE_URL . "/" . "verify.php?loginId=" .$loginId;Code: Select all
$message = "To verify your account please click this " . SITE_URL . "/" . "verify.php?loginId=" . md5(sha1($loginId));Code: Select all
$login = new Login();
$login->verify($_REQUEST['loginId']);Or am I going about this verification progress completely wrong? Can anyone point me in the right direction.