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 3y ago1 watchersCompare

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

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

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

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

[phpids/phpids

PHPIDS (PHP-Intrusion Detection System) is a simple to use, well structured, fast and state-of-the-art security layer for your PHP based web application

791150.0k2](/packages/phpids-phpids)[paragonie/ecc

PHP Elliptic Curve Cryptography library

25866.3k44](/packages/paragonie-ecc)[nicobleiler/php-passphrase

Passphrase generator with Laravel integration, inspired by Bitwarden. Uses the EFF long word list by default with support for custom wordlists.

4912.6k](/packages/nicobleiler-php-passphrase)[dwgebler/encryption

Encryption wrapper for PHP using libsodium — simple API for symmetric and asymmetric encryption, password hashing, digital signing, and message authentication.

317.5k](/packages/dwgebler-encryption)

PHPackages © 2026

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