PHPackages                             iiifx-production/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. iiifx-production/password-generator

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

iiifx-production/password-generator
===================================

Simple password generation package

v0.2.0(9y ago)3107MIT LicensePHPPHP &gt;=5.4

Since Nov 6Pushed 9y ago1 watchersCompare

[ Source](https://github.com/iiifx-production/password-generator)[ Packagist](https://packagist.org/packages/iiifx-production/password-generator)[ Docs](https://github.com/iiifx-production/password-generator)[ RSS](/packages/iiifx-production-password-generator/feed)WikiDiscussions master Synced 4w ago

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

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

[](#password-generator)

Простая библиотека для генерации паролей c возможностью использования криптографически безопасных алгоритмов

[![Latest Version on Packagist](https://camo.githubusercontent.com/8c0a1fc51104ef13594da9768ccb53217480799b98224e907018a9ff84a99244/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f69696966782d70726f64756374696f6e2f70617373776f72642d67656e657261746f722e737667)](https://packagist.org/packages/iiifx-production/password-generator) [![Build Status](https://camo.githubusercontent.com/df728034cc68f19ac8a2d33e82fda6be45712183b54b507afe8f6527fd7e5ab6/68747470733a2f2f7472617669732d63692e6f72672f69696966782d70726f64756374696f6e2f70617373776f72642d67656e657261746f722e737667)](https://travis-ci.org/iiifx-production/password-generator) [![Code Quality](https://camo.githubusercontent.com/1a2689be8dd861f00f899473d35510e8ec3c1feaeeb37ba62f11c1e59ea2c608/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f69696966782d70726f64756374696f6e2f70617373776f72642d67656e657261746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/iiifx-production/password-generator/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/5ca03efb8d698fe9be7d326ffd321558d0d8f3b613c71d9eb393776b11d755e1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f69696966782d70726f64756374696f6e2f70617373776f72642d67656e657261746f722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/iiifx-production/password-generator/?branch=master) [![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md) [![Total Downloads](https://camo.githubusercontent.com/93f5647b93ee11080c89880be20c0673decec7c93ed72434fcc0ac33036afc19/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f69696966782d70726f64756374696f6e2f70617373776f72642d67656e657261746f722e737667)](https://packagist.org/packages/iiifx-production/password-generator)

Установка
---------

[](#установка)

Используя Composer:

```
$ composer require "iiifx-production/password-generator:0.*"
```

Использование
-------------

[](#использование)

Создание простых, коротких паролей: 5 знаков, только цифры

```
use iiifx\PasswordGenerator\Length;
use iiifx\PasswordGenerator\Options;
use iiifx\PasswordGenerator\Symbols;
use iiifx\PasswordGenerator\Generator;

$length = new Length( 5 );
$symbols = [
    new Symbols( '1234567890' ),
];
$options = new Options( $length, $symbols );
$generator = new Generator( $options );

echo $generator->generate(); # 47884
echo $generator->generate(); # 62802
echo $generator->generate(); # 35187
```

Сложные, безопасные пароли: от 10 до 16 знаков, цифры, буквы и спец. знаки

```
use iiifx\PasswordGenerator\Method\MethodOpenSSL;

$length = new Length( 10, 16 ); # 10-16 знаков
$symbols = [
    new Symbols( 'abcdefghijklmnopqrstuvwxyz', 100 ), # Приоритет 100
    new Symbols( 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 50 ), # Приоритет 50
    new Symbols( '1234567890', 50 ), # Приоритет 50
    new Symbols( '!@#$%?&:*+-.', 30 ), # Приоритет 30
];
$options = new Options( $length, $symbols );
$method = new MethodOpenSSL();
$generator = new Generator( $options, $method );

echo $generator->generate(); # Xn64h1:wgDk@@eh
echo $generator->generate(); # lqF&X4ywaAo
echo $generator->generate(); # E8Yk60*qavzVr
```

Использование криптографически безопасных методов генерации

```
use iiifx\PasswordGenerator\Method\MethodMT;
use iiifx\PasswordGenerator\Method\MethodOpenSSL;
use iiifx\PasswordGenerator\Method\MethodRandomInt;

# По умолчанию используется базовый небезопасный алгоритм - MT
$generator = new Generator( $options );
# Этот пример аналогичен предыдущему
$generator = new Generator( $options, new MethodMT() );

# Для PHP7 возможно использовать безопасный метод random_int()
$generator = new Generator( $options, new MethodRandomInt() );

# При наличии расширения возможно использовать безопасный метод OpenSSL
$generator = new Generator( $options, new MethodOpenSSL() );

# Любой из методов можно проверить на доступность
MethodMT::isAvailable(); # true, доступен всегда
MethodRandomInt::isAvailable(); # false, метод недоступен для PHP5
MethodOpenSSL::isAvailable(); # true, расширение OpenSSL подключено
```

Другие примеры
--------------

[](#другие-примеры)

Имитация хэшей

```
$generator = new Generator( new Options(
    new Length( 32 ),
    [ new Symbols( '0123456789abcdef' ) ]
) );
echo $generator->generate(); # 3a971aefab2b86468d1de895110b0e39
```

Тесты
-----

[](#тесты)

[![Build Status](https://camo.githubusercontent.com/df728034cc68f19ac8a2d33e82fda6be45712183b54b507afe8f6527fd7e5ab6/68747470733a2f2f7472617669732d63692e6f72672f69696966782d70726f64756374696f6e2f70617373776f72642d67656e657261746f722e737667)](https://travis-ci.org/iiifx-production/password-generator) [![Code Coverage](https://camo.githubusercontent.com/5ca03efb8d698fe9be7d326ffd321558d0d8f3b613c71d9eb393776b11d755e1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f69696966782d70726f64756374696f6e2f70617373776f72642d67656e657261746f722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/iiifx-production/password-generator/?branch=master)

Лицензия
--------

[](#лицензия)

[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)

Запланировано
-------------

[](#запланировано)

- Использовать криптографически безопасные генераторы случаных чисел
    - Для PHP7 использовать random\_int()
    - Для PHP5 использовать openssl\_random\_pseudo\_bytes()
    - Использовать сторонние решения
- Реализовать формирование пароля по шаблону
- Реализовать быстрое создание через Generator::create( ... )

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Total

2

Last Release

3520d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

iiifxpassword-generatorpasswordsphpphppasswordgeneratorpasswordspassword generator

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[tomloprod/radiance

A deterministic mesh gradient avatar generator for PHP.

1407.5k](/packages/tomloprod-radiance)

PHPackages © 2026

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