Beispiel #1
0
 function encode_url($url)
 {
     // --- SSE start
     //        return rawurlencode(base64_encode($url));
     // We add the HMAC of the URL in front of the URL. (sha1 is 40 bytes in hex)
     $encrypted_url = XOREncrypt64($url, $_SESSION['randomkey']);
     $hmac = hmacsha1($_SESSION['randomkey'], $encrypted_url);
     return rawurlencode($hmac . $encrypted_url);
 }
Beispiel #2
0
function encode_url($url)
{
    $encrypted_url = XOREncrypt64($url, $_SESSION['randomkey']);
    $hmac = hmacsha1($_SESSION['randomkey'], $encrypted_url);
    return rawurlencode($hmac . $encrypted_url);
}