PHPackages                             luminar-organization/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. [Security](/categories/security)
4. /
5. luminar-organization/security

ActiveLibrary[Security](/categories/security)

luminar-organization/security
=============================

A security component for the Luminar framework.

04PHP

Since Aug 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/luminar-organization/security)[ Packagist](https://packagist.org/packages/luminar-organization/security)[ RSS](/packages/luminar-organization-security/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Luminar Security
================

[](#luminar-security)

[![Tests Status](https://camo.githubusercontent.com/ee0c8ffbfc3001125506653644918acea40d4525e3916c263a7c2854f43b3e03/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c756d696e61722d6f7267616e697a6174696f6e2f73656375726974792f74657374732e796d6c3f6c6162656c3d5465737473)](https://camo.githubusercontent.com/ee0c8ffbfc3001125506653644918acea40d4525e3916c263a7c2854f43b3e03/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c756d696e61722d6f7267616e697a6174696f6e2f73656375726974792f74657374732e796d6c3f6c6162656c3d5465737473)

Luminar Security is a PHP library designed to provide a comprehensive set of security utilities and components for building secure web applications. It includes modules for authentication, encryption, hashing, protection against common web vulnerabilities, and more.

Features
--------

[](#features)

- **Authentication**: Form Login, access tokens, login link, and utility functions.
- **Encryption**: Support for AES256, Base64, RSA, and XOR encryption methods.
- **Hashing**: Provides multiple hashing algorithms like Argon2i, Argon2id, Bcrypt, Hmac, MD5, SHA1, and SHA256
- **Protection**: Protection against CSRF, XSS, XML attacks, ClickJacking.
- **Exceptions**: Custom exceptions for handling security-related errors.

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

[](#installation)

To install the Luminar Security library, you can use Composer:

```
composer require luminar-organization/security
```

Usage
-----

[](#usage)

### Authentication

[](#authentication)

Example of using form-based authentication

```
use Luminar\Security\Authentication\FormLogin;
use Luminar\Core\Config\Config;
use Luminar\Http\Request;
use Luminar\Http\Managers\SessionManager;
use Luminar\Database\Connection\Connection;

$connection = new Connection("mysql:host=localhost;dbname=luminar-test", 'root');
$config = new Config("PATH TO YOUR CONFIGS LOCATION");
$sessionManager = new SessionManager();
$request = new Request();

// Form Login can throw these exceptions:
// - ConfigException (invalid configuration)
// - InvalidCredentials (invalid credentials)
// - SuccessAuthentication (on success)
new FormLogin($request, $config, $sessionManager, $connection);
```

### Encryption

[](#encryption)

Example of encrypting data with AES256

```
use Luminar\Security\Encryption\AES256;

$AES256 = new AES256();

$data = "Hello World!";
$secretKey = 'my_secret_key';
$secretVi = 'my_secret_vi';

$encrypted = $AES256->encrypt($data, $secretKey, $secretVi);
$decrypted = $AES256->decrypt($encrypted, $secretKey, $secretVi);
```

Testing
-------

[](#testing)

The library includes a comprehensive set of tests to ensure its security features are working correctly. To run the tests, use PHPUnit:

```
composer run test
```

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

[](#contributing)

Checkout our [core repository CONTRIBUTING.md](https://github.com/luminar-organization/core/)

License
-------

[](#license)

This project is licendes under the MIT License - se the [License](LICENSE) file for details

Support
-------

[](#support)

If you have any questions or need help, feel free to open an issue in the GitHub Repository.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity17

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/fa131d309a1f4fe39efb438779b5fcf52d26209a293b4399d3f3bebca6196c0f?d=identicon)[PatrykMolenda](/maintainers/PatrykMolenda)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[mews/purifier

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

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41478.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

87117.5M63](/packages/bjeavons-zxcvbn-php)[illuminate/encryption

The Illuminate Encryption package.

9229.7M280](/packages/illuminate-encryption)[paragonie/hidden-string

Encapsulate strings in an object to hide them from stack traces

7410.6M39](/packages/paragonie-hidden-string)

PHPackages © 2026

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