X7ROOT File Manager
Current Path:
/home/gfecatvj/sites/realesbar-X/vendor/opis/closure/src
home
/
gfecatvj
/
sites
/
realesbar-X
/
vendor
/
opis
/
closure
/
src
/
📁
..
📄
Analyzer.php
(1.45 KB)
📄
ClosureContext.php
(625 B)
📄
ClosureScope.php
(587 B)
📄
ClosureStream.php
(2.22 KB)
📄
ISecurityProvider.php
(566 B)
📄
ReflectionClosure.php
(37.91 KB)
📄
SecurityException.php
(371 B)
📄
SecurityProvider.php
(980 B)
📄
SelfReference.php
(618 B)
📄
SerializableClosure.php
(20.29 KB)
Editing: SecurityProvider.php
<?php /* =========================================================================== * Copyright (c) 2018-2019 Zindex Software * * Licensed under the MIT License * =========================================================================== */ namespace Opis\Closure; class SecurityProvider implements ISecurityProvider { /** @var string */ protected $secret; /** * SecurityProvider constructor. * @param string $secret */ public function __construct($secret) { $this->secret = $secret; } /** * @inheritdoc */ public function sign($closure) { return array( 'closure' => $closure, 'hash' => base64_encode(hash_hmac('sha256', $closure, $this->secret, true)), ); } /** * @inheritdoc */ public function verify(array $data) { return base64_encode(hash_hmac('sha256', $data['closure'], $this->secret, true)) === $data['hash']; } }
Upload File
Create Folder