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.3(4w ago)25.2k↑156.3%2MITPHPPHP &gt;=8.5CI passing

Since Mar 26Pushed 4w 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 today

READMEChangelog (10)Dependencies (27)Versions (62)Used By (2)

[![presentation-lion-packages](https://private-user-images.githubusercontent.com/56183278/530378379-35815432-5f2d-44df-b3bd-382858714d9a.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODMxNDU1NjMsIm5iZiI6MTc4MzE0NTI2MywicGF0aCI6Ii81NjE4MzI3OC81MzAzNzgzNzktMzU4MTU0MzItNWYyZC00NGRmLWIzYmQtMzgyODU4NzE0ZDlhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzA0VDA2MDc0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUyNGUzOGY3OTAxMzc0N2M4MDIwODljOTYxMTYzNjNkZjUyNzcxODdlMTI1OGNlMjc5YzkwMzY0MmMyZWIxYjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.tdkyn6cDUvt99KswVahCCDEEqKt4-Duy6cX_QuXbLBg)](https://private-user-images.githubusercontent.com/56183278/530378379-35815432-5f2d-44df-b3bd-382858714d9a.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODMxNDU1NjMsIm5iZiI6MTc4MzE0NTI2MywicGF0aCI6Ii81NjE4MzI3OC81MzAzNzgzNzktMzU4MTU0MzItNWYyZC00NGRmLWIzYmQtMzgyODU4NzE0ZDlhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzA0VDA2MDc0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUyNGUzOGY3OTAxMzc0N2M4MDIwODljOTYxMTYzNjNkZjUyNzcxODdlMTI1OGNlMjc5YzkwMzY0MmMyZWIxYjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.tdkyn6cDUvt99KswVahCCDEEqKt4-Duy6cX_QuXbLBg) [ ![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

58

—

FairBetter than 98% of packages

Maintenance94

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

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

Recently: every ~40 days

Total

57

Last Release

29d 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

v11.15.0 → 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://avatars.githubusercontent.com/u/139179826?v=4)[Lion-Packages](/maintainers/lion-packages)[@lion-packages](https://github.com/lion-packages)

---

Top Contributors

[![Sleon4](https://avatars.githubusercontent.com/u/56183278?v=4)](https://github.com/Sleon4 "Sleon4 (201 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (16 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

[google/auth

Google Auth Library for PHP

1.4k294.2M219](/packages/google-auth)[ellaisys/aws-cognito

Laravel Authentication using AWS Cognito (Web and API)

123256.9k1](/packages/ellaisys-aws-cognito)[rainlab/user-plugin

User plugin for October CMS

11955.0k15](/packages/rainlab-user-plugin)

PHPackages © 2026

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