PHPackages                             lion/security - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. lion/security

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

lion/security
=============

Library created with the function of implementing AES, RSA and JWT security features for PHP.

v12.0.0(4mo ago)24.7k↑925%2MITPHPPHP &gt;=8.5CI passing

Since Mar 26Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/Lion-Packages/security)[ Packagist](https://packagist.org/packages/lion/security)[ Docs](https://dev.lion-packages.com)[ RSS](/packages/lion-security/feed)WikiDiscussions 12.x Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (55)Used By (2)

[![presentation-lion-packages](https://private-user-images.githubusercontent.com/56183278/530378379-35815432-5f2d-44df-b3bd-382858714d9a.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzM4MTgyNzEsIm5iZiI6MTc3MzgxNzk3MSwicGF0aCI6Ii81NjE4MzI3OC81MzAzNzgzNzktMzU4MTU0MzItNWYyZC00NGRmLWIzYmQtMzgyODU4NzE0ZDlhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzE4VDA3MTI1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk0NTExZDYxYmY4OTVlYjU0Y2U0ZGY5MDQwOGVjNjQ4NGEwNjgwNWUwYWU4MmE2OGZlOWY2YjcwMTk1NDYxOTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.u8SDwh1hdH7lQ7z9rZP-H-Vu0cE0if8cmj0fXbXE5Pc)](https://private-user-images.githubusercontent.com/56183278/530378379-35815432-5f2d-44df-b3bd-382858714d9a.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzM4MTgyNzEsIm5iZiI6MTc3MzgxNzk3MSwicGF0aCI6Ii81NjE4MzI3OC81MzAzNzgzNzktMzU4MTU0MzItNWYyZC00NGRmLWIzYmQtMzgyODU4NzE0ZDlhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzE4VDA3MTI1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk0NTExZDYxYmY4OTVlYjU0Y2U0ZGY5MDQwOGVjNjQ4NGEwNjgwNWUwYWU4MmE2OGZlOWY2YjcwMTk1NDYxOTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.u8SDwh1hdH7lQ7z9rZP-H-Vu0cE0if8cmj0fXbXE5Pc) [ ![Latest Stable Version](https://camo.githubusercontent.com/3043c395404bf1206b7ba54edf40ee24f4319240522de358fc2d5b0caa5ca955/68747470733a2f2f706f7365722e707567782e6f72672f6c696f6e2f73656375726974792f76) ](https://packagist.org/packages/lion/security) [ ![Total Downloads](https://camo.githubusercontent.com/73b6180cfeef0d3b7fd6066b4061943679d93802a8f352611f1a728f19d3755c/68747470733a2f2f706f7365722e707567782e6f72672f6c696f6e2f73656375726974792f646f776e6c6f616473) ](https://packagist.org/packages/lion/security) [ ![License](https://camo.githubusercontent.com/3f0807618176ce690f5bcc33ea1f8247aa3a78af27c7ba35e521d4a86e014d9a/68747470733a2f2f706f7365722e707567782e6f72672f6c696f6e2f73656375726974792f6c6963656e7365) ](https://github.com/lion-packages/security/blob/main/LICENSE) [ ![PHP Version Require](https://camo.githubusercontent.com/802237ca54806c8e7632a68436537d039e4e00440c0c00cae0732800f17254ff/68747470733a2f2f706f7365722e707567782e6f72672f6c696f6e2f73656375726974792f726571756972652f706870) ](https://www.php.net/)

🚀 **Lion-Security** Library created with the function of implementing AES and RSA Security functions for PHP, it also includes functions to create JWT.

---

📖 Features
----------

[](#-features)

✔️ Symmetric encryption with AES.
✔️ JWT token generation.
✔️ Encryption key creation and RSA encryption.
✔️ Password creation using the SHA256 algorithm.

---

📦 Installation
--------------

[](#-installation)

Install the security using **Composer**:

```
composer require lion/security
```

📝 License
---------

[](#-license)

The **security** is open-sourced software licensed under the [MIT License](https://github.com/lion-packages/security/blob/main/LICENSE).

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance80

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 83.8% 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.

###  Release Activity

Cadence

Every ~27 days

Total

54

Last Release

78d ago

Major Versions

v8.1.0 → v9.0.02024-01-20

v9.1.1 → v10.0.02024-10-31

v10.0.0 → v11.0.02024-12-01

10.x-dev → v11.12.02025-10-01

11.x-dev → v12.0.02025-12-27

PHP version history (7 changes)v1.0PHP &gt;=8.0.9

v6.6PHP &gt;=8.0

v6.9.0PHP &gt;=8.1

v8.0.0PHP &gt;=8.2

v10.0.0PHP &gt;=8.3

v11.0.0PHP &gt;=8.4

v12.0.0PHP &gt;=8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/1419758fcb0259274d35f6d2cbfb5a60694baa74e99437d32dfec9a0d5c10d65?d=identicon)[lion-packages](/maintainers/lion-packages)

---

Top Contributors

[![Sleon4](https://avatars.githubusercontent.com/u/56183278?v=4)](https://github.com/Sleon4 "Sleon4 (196 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (13 commits)")[![GabrielPalac](https://avatars.githubusercontent.com/u/162063476?v=4)](https://github.com/GabrielPalac "GabrielPalac (9 commits)")[![mcesmeralda](https://avatars.githubusercontent.com/u/96641807?v=4)](https://github.com/mcesmeralda "mcesmeralda (5 commits)")[![LeinadAlberto](https://avatars.githubusercontent.com/u/127895160?v=4)](https://github.com/LeinadAlberto "LeinadAlberto (5 commits)")[![MMarioLP](https://avatars.githubusercontent.com/u/105904645?v=4)](https://github.com/MMarioLP "MMarioLP (2 commits)")[![JPCORREDOR05](https://avatars.githubusercontent.com/u/101783650?v=4)](https://github.com/JPCORREDOR05 "JPCORREDOR05 (1 commits)")[![Santiago1010](https://avatars.githubusercontent.com/u/48629173?v=4)](https://github.com/Santiago1010 "Santiago1010 (1 commits)")[![jerezjustin](https://avatars.githubusercontent.com/u/132396080?v=4)](https://github.com/jerezjustin "jerezjustin (1 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")

---

Tags

aesjwtphprsavalidationsecuritylionlion-security

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/lion-security/health.svg)

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[hwi/oauth-bundle

Support for authenticating users using both OAuth1.0a and OAuth2 in Symfony.

2.4k21.5M69](/packages/hwi-oauth-bundle)[lusitanian/oauth

PHP 7.2 oAuth 1/2 Library

1.1k23.2M121](/packages/lusitanian-oauth)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[cartalyst/sentinel

PHP 8.2+ Fully-featured Authentication &amp; Authorization System

1.6k2.7M72](/packages/cartalyst-sentinel)[jms/security-extra-bundle

Enhances the Symfony2 Security Component by adding several new features

2628.1M59](/packages/jms-security-extra-bundle)

PHPackages © 2026

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