PHPackages                             escuelait/custom-password-generator - 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. escuelait/custom-password-generator

ActiveLibrary

escuelait/custom-password-generator
===================================

Custom Password Generator for PHP

0.1.0(10mo ago)00MITPHP

Since Jun 13Pushed 10mo agoCompare

[ Source](https://github.com/EscuelaIt/custom-password-generator)[ Packagist](https://packagist.org/packages/escuelait/custom-password-generator)[ RSS](/packages/escuelait-custom-password-generator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Custom Password Generator
=========================

[](#custom-password-generator)

A lightweight, customizable password generator by Escuelait. Ideal for generating secure, random passwords with optional symbol inclusion.

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

[](#installation)

Install via Composer:

```
composer require escuelait/custom-password-generator
```

Quick Usage
-----------

[](#quick-usage)

```
use Escuelait\CustomPasswordGenerator\PasswordGenerator;

$generator = new PasswordGenerator();

// Generate a 12-character password with 2 symbols (default settings)
$password = $generator->generate();

echo $password; // Example: @k1Zq9&Lm08A
```

Configuration
-------------

[](#configuration)

You can customize both the total password length and the number of symbols:

```
$password = (new PasswordGenerator())
    ->length(16)   // Total length of the password
    ->symbols(4)   // Number of symbols to include
    ->generate();

echo $password; // Example: %aB3#XgF1$Ld9&kM
```

> ⚠️ If the number of symbols exceeds the total password length, an `InvalidArgumentException` will be thrown.

How It Works
------------

[](#how-it-works)

- **Character sets used:**

    - Letters: `a-z`, `A-Z`
    - Numbers: `0-9`
    - Symbols: `!@#$%&*()_+-=[]{}|;:,.?`
- **Defaults:**

    - Length: `12`
    - Symbols: `2`
- **Fluent methods:**

    - `length(int $length)` — Set total password length.
    - `symbols(int $symbols)` — Set number of symbols.

Example
-------

[](#example)

```
use Escuelait\CustomPasswordGenerator\PasswordGenerator;

$password = (new PasswordGenerator())
    ->length(20)
    ->symbols(5)
    ->generate();

echo $password;
```

❗ Exceptions
------------

[](#-exceptions)

If the number of requested symbols exceeds the total length:

```
InvalidArgumentException: The number of symbols cannot exceed the total password length
```

Future Improvements
-------------------

[](#future-improvements)

- Unit tests
- Option to exclude ambiguous characters
- CLI version

License
-------

[](#license)

This package is open-sourced under the [MIT license](LICENSE).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance56

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity27

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.

###  Release Activity

Cadence

Every ~3 days

Total

2

Last Release

326d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ebd1c9b67881b1023d6ee2f43a924b14782a43a5bb32d1a167aa6c54ffb1dcd5?d=identicon)[midesweb](/maintainers/midesweb)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/escuelait-custom-password-generator/health.svg)

```
[![Health](https://phpackages.com/badges/escuelait-custom-password-generator/health.svg)](https://phpackages.com/packages/escuelait-custom-password-generator)
```

PHPackages © 2026

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