PHPackages                             devuri/secure-password - 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. devuri/secure-password

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

devuri/secure-password
======================

A PHP package to generate cryptographically secure passwords and passcodes

0.1.2(2y ago)223.8k↓100%2MITPHPPHP ^7.4 || ^8.0CI passing

Since Jul 5Pushed 2y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (7)Versions (3)Used By (2)

Secure Password Generator
=========================

[](#secure-password-generator)

Secure Password Generator is a PHP package that allows you to generate cryptographically secure passwords and passcodes.

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

[](#installation)

You can install the package using [Composer](https://getcomposer.org/). Run the following command:

```
composer require devuri/secure-password
```

Usage
-----

[](#usage)

### Generating a Password

[](#generating-a-password)

To generate a password, you can use the `PasswordGenerator::generatePassword()` method. By default, it generates a password with a length of 8 characters and includes special characters.

```
use Urisoft\PasswordGenerator;

$password = PasswordGenerator::generatePassword();
echo "Generated Password: $password" . PHP_EOL;
```

You can customize the length and inclusion of special characters by providing optional arguments:

```
$password = PasswordGenerator::generatePassword(12, false);
echo "Generated Password (without special chars): $password" . PHP_EOL;
```

### Generating a Passcode

[](#generating-a-passcode)

To generate a passcode consisting of only digits, you can use the `PasswordGenerator::generatePasscode()` method. By default, it generates a passcode with a length of 6 digits.

```
$passcode = PasswordGenerator::generatePasscode();
echo "Generated Passcode: $passcode" . PHP_EOL;
```

You can customize the length of the passcode by providing an optional argument:

```
$passcode = PasswordGenerator::generatePasscode(8);
echo "Generated Passcode (8 digits): $passcode" . PHP_EOL;
```

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

[](#contributing)

Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.

License
-------

[](#license)

This package is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).

Credits
-------

[](#credits)

Secure Password Generator was developed by [Uriel Wilson](https://github.com/devuri).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 95% 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 ~0 days

Total

2

Last Release

1038d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8fd19f958b007ec6588d0a5ca2fe78e107edd652f286b836d36b5d1781d573a5?d=identicon)[devuri](/maintainers/devuri)

---

Top Contributors

[![devuri](https://avatars.githubusercontent.com/u/4777400?v=4)](https://github.com/devuri "devuri (19 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

packagistphp-libraryrandomutilitysecuritypasswordlibrarygeneratorsecurepassword generatorpasscodecryptographic

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/devuri-secure-password/health.svg)

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

###  Alternatives

[genphrase/genphrase

Secure passphrase generator for PHP applications

118302.5k4](/packages/genphrase-genphrase)[gladcodes/keygen

A fluent PHP random key generator.

119668.9k2](/packages/gladcodes-keygen)[ph-7/passcode-password-generator

A simple way to generate random cryptographically secure passcodes and passwords

1223.4k2](/packages/ph-7-passcode-password-generator)[tajawal/lodash-php

A full-on PHP manipulation utility-belt that provides support for the usual functional.

232.6k1](/packages/tajawal-lodash-php)

PHPackages © 2026

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