Skip to content

anshu2212/ar_nonce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

ar_nonce

This is not exactly a "Number Used Once". Neither a number Nor can be Just Used Once. But can Reduce the Repitive Attachs by Decreasing the Window of attach

To apply to your project

  1. include the class in all your file that needs to generate nonce or verify nonce. Eg.
    <?php include(PATH TO ar_nonce.class.php ); ?>
  2. Then create new instance of class
    <?php $nonce=new ar_Nonce();  ?>
  3. To attach a nonce we have 3 methods.
    1. To attach in Form :
      <?php echo $nonce->generate_form_nonce(string $action , [ string $user ] , [ bool $output=false ]); ?>
    2. To attach in Url :
      <?php echo $nonce->generate_url_nonce( string $action,[ string $user],[bool $out=false ]); ?> 
    3. To other purposes :
      <?php echo $nonce->generate( string $action ,[string $user] , [ int $timeoutSeconds , [ string $secretKey ]); ?> 
  4. To verify a nonce :
    <?php $nonce->check(string $nonce , string $action , [ string $user ], [ string $secret]) ?>

About

This is not exactly a "Number Used Once". Neither a number Nor can be Just Used Once. But can Reduce the Repitive Attachs by Decreasing the Window of attach

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages