PHPackages                             academy01/csrftoken - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. academy01/csrftoken

ActiveLibrary[Security](/categories/security)

academy01/csrftoken
===================

Simple package to generate and validate csrf Tokens

138PHP

Since Aug 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/mhnobakht/csrftoken)[ Packagist](https://packagist.org/packages/academy01/csrftoken)[ RSS](/packages/academy01-csrftoken/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

CSRF Token Generator
====================

[](#csrf-token-generator)

Generate and Validate CSRF Tokens to make forms Secure.

Installation
------------

[](#installation)

Use the package manager

```
composer require academy01/csrftoken
```

Usage
-----

[](#usage)

```
require "vendor/autoload.php";

use Academy01\Csrftoken;;

CsrfToken::generate();

CsrfToken::validate($token);
```

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/98ce2ef28d2083496859584b153a9dfeee2298e6b2ed3e0e96c41b28ca1aff91?d=identicon)[mhnobakht](/maintainers/mhnobakht)

---

Top Contributors

[![mhnobakht](https://avatars.githubusercontent.com/u/80899303?v=4)](https://github.com/mhnobakht "mhnobakht (3 commits)")

### Embed Badge

![Health badge](/badges/academy01-csrftoken/health.svg)

```
[![Health](https://phpackages.com/badges/academy01-csrftoken/health.svg)](https://phpackages.com/packages/academy01-csrftoken)
```

###  Alternatives

[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k18.7M142](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24820.0k37](/packages/paragonie-ecc)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
