I am solving it by having all necessary data in link:
http://example.com?id=user-info
Where "user-info" is crypted everything what i need:
$cyphre = new Crypt_Xtea;
$user-info = $username."-".$password."-".$any-other-info-i-need;
$user-info = urlencode(base64_encode($cyphre->encrypt((string)$user-info, "[cyphre key]")));
On other side i have
$cyphre = new Crypt_Xtea;
$user-info = $cyphre->decrypt(base64_decode(urldecode($_GET["id"])),"[cyphre key]");
$user-info = explode("-",$user-info);
In this example:
$user-info[0] = $username;
$user-info[1] = $password;
etc
Downsides of this approach:
- You have to have access to the source code of both sides
- Its not bulletproof (Salt, Salt, Salt! )