/opt/alt/php55/usr/share/pear/Symfony/Component/HttpKernel
NameSizeModeActions
Bundle/-0755rm
CacheClearer/-0755rm
CacheWarmer/-0755rm
Config/-0755rm
Controller/-0755rm
DataCollector/-0755rm
Debug/-0755rm
DependencyInjection/-0755rm
Event/-0755rm
EventListener/-0755rm
Exception/-0755rm
Fragment/-0755rm
HttpCache/-0755rm
Log/-0755rm
Profiler/-0755rm
autoloader.php3400644editdlrm
Client.php69820644editdlrm
HttpKernel.php92230644editdlrm
HttpKernelInterface.php13450644editdlrm
Kernel.php237400644editdlrm
KernelEvents.php31870644editdlrm
KernelInterface.php50530644editdlrm
TerminableInterface.php10520644editdlrm
UriSigner.php16880644editdlrm
Edit: /opt/alt/php55/usr/share/pear/Symfony/Component/HttpKernel/UriSigner.php (1688B)
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel; /** * Signs URIs. * * @author Fabien Potencier */ class UriSigner { private $secret; /** * Constructor. * * @param string $secret A secret */ public function __construct($secret) { $this->secret = $secret; } /** * Signs a URI. * * The given URI is signed by adding a _hash query string parameter * which value depends on the URI and the secret. * * @param string $uri A URI to sign * * @return string The signed URI */ public function sign($uri) { return $uri.(false === (strpos($uri, '?')) ? '?' : '&').'_hash='.$this->computeHash($uri); } /** * Checks that a URI contains the correct hash. * * The _hash query string parameter must be the last one * (as it is generated that way by the sign() method, it should * never be a problem). * * @param string $uri A signed URI * * @return Boolean True if the URI is signed correctly, false otherwise */ public function check($uri) { if (!preg_match('/^(.*)(?:\?|&)_hash=(.+?)$/', $uri, $matches)) { return false; } return $this->computeHash($matches[1]) === $matches[2]; } private function computeHash($uri) { return urlencode(base64_encode(hash_hmac('sha256', $uri, $this->secret, true))); } }