����JFIF��x�x����'
Server IP : 66.29.137.217 / Your IP : 18.219.93.1 Web Server : LiteSpeed System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : gltevjme ( 1095) PHP Version : 7.0.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/gltevjme/bofirm.gltechlimited.com/vendor/league/glide/src/Signatures/ |
Upload File : |
<?php namespace League\Glide\Signatures; class Signature implements SignatureInterface { /** * Secret key used to generate signature. * * @var string */ protected $signKey; /** * Create Signature instance. * * @param string $signKey Secret key used to generate signature. */ public function __construct($signKey) { $this->signKey = $signKey; } /** * Add an HTTP signature to manipulation parameters. * * @param string $path The resource path. * @param array $params The manipulation parameters. * * @return array The updated manipulation parameters. */ public function addSignature($path, array $params) { return array_merge($params, ['s' => $this->generateSignature($path, $params)]); } /** * Validate a request signature. * * @param string $path The resource path. * @param array $params The manipulation params. * * @throws SignatureException * * @return void */ public function validateRequest($path, array $params) { if (!isset($params['s'])) { throw new SignatureException('Signature is missing.'); } if ($params['s'] !== $this->generateSignature($path, $params)) { throw new SignatureException('Signature is not valid.'); } } /** * Generate an HTTP signature. * * @param string $path The resource path. * @param array $params The manipulation parameters. * * @return string The generated HTTP signature. */ public function generateSignature($path, array $params) { unset($params['s']); ksort($params); return md5($this->signKey.':'.ltrim($path, '/').'?'.http_build_query($params)); } }