PHP code example of rhurling / nonces

1. Go to this page and download the library: Download rhurling/nonces 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/ */

    

rhurling / nonces example snippets

 php
use RouvenHurling\Nonces\Verifer;

$verifier = new Verifier();
$verifier->verify($nonce, $action);
 php
$nonce = new Nonce('Action', $myConfig);
$verifier = new Verifier($myConfig);

$nonce->setLifespan(172800);
$nonce->setAlgorithm('sha256');
$nonce->setSalt($salt);
$nonce->setUserId($userId);
$nonce->setSessionToken($sessionToken);