8889841chome/clixcotz/mars.clix.co.tz/vendor/opis/closure/src/SecurityProvider.php000066600000001724150513443510023045 0ustar00secret = $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']; } }