Explorer
home
/
zoteqbgb
/
public_html
/
vendor
/
laravel
/
serializable-closure
/
src
/
Signers
Location:
/home/zoteqbgb/public_html/vendor/laravel/serializable-closure/src/Signers
Root path:
/home/zoteqbgb/public_html/config/676626
Editing: Hmac.php
<?php namespace Laravel\SerializableClosure\Signers; use Laravel\SerializableClosure\Contracts\Signer; class Hmac implements Signer { /** * The secret key. * * @var string */ protected $secret; /** * Creates a new signer instance. * * @param string $secret * @return void */ public function __construct($secret) { $this->secret = $secret; } /** * Sign the given serializable. * * @param string $serialized * @return array */ public function sign($serialized) { return [ 'serializable' => $serialized, 'hash' => base64_encode(hash_hmac('sha256', $serialized, $this->secret, true)), ]; } /** * Verify the given signature. * * @param array $signature * @return bool */ public function verify($signature) { return hash_equals(base64_encode( hash_hmac('sha256', $signature['serializable'], $this->secret, true) ), $signature['hash']); } }
Save maftirs
Upload
Start Upload
New File
Create File
New Folder
Create Folder
Directory Contents
Name
Size
Perms
Modified
Actions
Hmac.php
1,073 bytes
0644
2024-11-14 23:34
âï¸
ðï¸
Rename
Chang
Apply