PHPackages                             hosteurope/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. hosteurope/password-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hosteurope/password-generator
=============================

Password generator for generating policy-compliant passwords.

v1.0.1(9y ago)023.6k↓38.5%MITPHPPHP &gt;=7.0.0

Since Oct 10Pushed 9y ago2 watchersCompare

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

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

Password Generator
==================

[](#password-generator)

This password generator will generate random passwords which will comply the given password policy.

Usage
-----

[](#usage)

Require this project using composer. This will make it available for your project.

```
composer require hosteurope/password-generator

```

Don't forget to require the composer autoloader, if not already done:

```
require 'vendor/autoload.php';
```

Then, to use the password generator, just create a new instance and set the requirements.

In this example, we require the password to be 16 characters in length, including at least four lowercase characters, one uppercase character, two numbers and one symbol.

```
$generator = new \PasswordGenerator\Generator;
$generator->requireLowercase(4)
    ->requireUppercase(1)
    ->requireNumber(2)
    ->requireSymbol(1)
    ->length(16);

var_dump($generator->get()); // string(16) "ZE0ff_Rgb6uGq28w"

var_dump($generator->get()); // string(16) "r5zRLn+8o#(gGffa"
```

Custom Character Types
----------------------

[](#custom-character-types)

If you're not satisfied with the given character types, feel free to add your own class.

Requirements are to extend the `PasswordGenerator\Characters\GenericCharacter` class. Then, add a new instance of that object to the desired Generator using

```
$generator->addCharacterType('myCharacterType', $customCharacterType);
```

You then can require and use them just as before:

```
$generator->requireMyCharacterType(1);
```

License
-------

[](#license)

This library is published under the MIT license. See `LICENSE` for more information.

Copyright (c) 2016 Host Europe Group Ltd.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 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 ~59 days

Total

2

Last Release

3449d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2329930?v=4)[Karim Geiger](/maintainers/KarimGeiger)[@KarimGeiger](https://github.com/KarimGeiger)

---

Top Contributors

[![kgeiger-godaddy](https://avatars.githubusercontent.com/u/105433340?v=4)](https://github.com/kgeiger-godaddy "kgeiger-godaddy (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[thedudeguy/rcon

Simple Rcon class for php.

16259.4k1](/packages/thedudeguy-rcon)[padosoft/support

agnostic helpers to use as foundation in packages and other project

5117.0k5](/packages/padosoft-support)[moe/full-calendar

A lightweight calendar module for Silverstripe. Implements the popular javascript http://fullcalendar.io/ library.

121.5k](/packages/moe-full-calendar)

PHPackages © 2026

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