SILENT KILLERPanel

Current Path: > > opt > cloudlinux > > alt-php54 > root > usr > share > pear > > Symfony > Component > HttpKernel


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/cloudlinux//alt-php54/root/usr/share/pear//Symfony/Component/HttpKernel

NameTypeSizeLast ModifiedActions
Bundle Directory - -
CacheClearer Directory - -
CacheWarmer Directory - -
Config Directory - -
Controller Directory - -
DataCollector Directory - -
Debug Directory - -
DependencyInjection Directory - -
Event Directory - -
EventListener Directory - -
Exception Directory - -
Fragment Directory - -
HttpCache Directory - -
Log Directory - -
Profiler Directory - -
Client.php File 6982 bytes December 18 2019 11:22:57.
HttpKernel.php File 9223 bytes December 18 2019 11:22:57.
HttpKernelInterface.php File 1345 bytes December 18 2019 11:22:57.
Kernel.php File 23740 bytes December 18 2019 11:22:57.
KernelEvents.php File 3187 bytes December 18 2019 11:22:57.
KernelInterface.php File 5053 bytes December 18 2019 11:22:57.
TerminableInterface.php File 1052 bytes December 18 2019 11:22:57.
UriSigner.php File 1688 bytes December 18 2019 11:22:57.
autoloader.php File 340 bytes December 18 2019 11:22:57.

Reading File: //opt/cloudlinux//alt-php54/root/usr/share/pear//Symfony/Component/HttpKernel/UriSigner.php

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * 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 <fabien@symfony.com>
 */
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)));
    }
}

SILENT KILLER Tool