PHP code example of rdisme / signs
1. Go to this page and download the library: Download rdisme/signs library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rdisme / signs example snippets
disme\Signs\Sign;
$conf = array(
'secret' => '1EHvT6lXgLS9C9Dr'
);
$s = new Sign($conf);
$data = array(
'a' => 22,
'b' => 33,
'd' => 11,
'c' => 55
);
// sign create
$sign = $s->create($data);
var_dump($sign);
// sign check
if ($s->check($data, $sign)) {
echo 'ok';
} else {
echo 'no';
}