PHPackages                             opensourcerefinery/random-string-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. opensourcerefinery/random-string-generator

ActiveLibrary

opensourcerefinery/random-string-generator
==========================================

Random String Generator to make simple tokens

1.0.0(6y ago)15MITPHPPHP &gt;=7.1CI failing

Since Mar 31Pushed 5y ago7 watchersCompare

[ Source](https://github.com/opensourcerefinery/random-string-generator)[ Packagist](https://packagist.org/packages/opensourcerefinery/random-string-generator)[ RSS](/packages/opensourcerefinery-random-string-generator/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Random String Generator
=======================

[](#random-string-generator)

UUID are great. But should never be public. Auto increment is dead. But how do you share something to the web thats not crazy long (sorry uuid, you nuts) but also not a just a timestamp that on a large system be known to collide.

Well you generate a token / "hash" / random string and use that as something that is unique to link to the entity you want to find.

```
$generator = new StringOfFormat(4, 'ab');
$this->assertRegExp('/[ab]{4}/', $generator->generate());

$string = RandomStringGenerator::randomString(16);
echo $string;
// vuHlvV9NTCwBbIxa

```

### Pulled from, Citations (and Thanks to):

[](#pulled-from-citations-and-thanks-to)

- 6 first characters: covers 16 777 216 hashes, but first collision happens after 4 096 hashes generated
- 7 first charecters: covers 268 435 456 hashes, but first collision happens after 16 384 hashes generated
- 8 first characters: covers 4 294 967 296 hashes, but first collision happens after 65 536 hashes generated

### Research:

[](#research)

### Tools:

[](#tools)

[source-foundry/font-v#2](https://github.com/source-foundry/font-v/issues/2)[https://emn178.github.io/online-tools/shake\_256.html](https://emn178.github.io/online-tools/shake_256.html)

### Future:

[](#future)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% 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

Unknown

Total

1

Last Release

2240d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/36116f724f1bd3ed808e54e2b2de6c17209c5c2c1954685fba18958ec8d055ee?d=identicon)[yvoyer](/maintainers/yvoyer)

![](https://www.gravatar.com/avatar/1e0a3fac1fa53e5c17a6d6fddb4f3f805c420ff8d5ba9490ff76b6be615c62e1?d=identicon)[mkoert](/maintainers/mkoert)

---

Top Contributors

[![dc-mkoert](https://avatars.githubusercontent.com/u/62149338?v=4)](https://github.com/dc-mkoert "dc-mkoert (5 commits)")[![mkoert](https://avatars.githubusercontent.com/u/307702?v=4)](https://github.com/mkoert "mkoert (1 commits)")[![yvoyer](https://avatars.githubusercontent.com/u/1745744?v=4)](https://github.com/yvoyer "yvoyer (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/opensourcerefinery-random-string-generator/health.svg)

```
[![Health](https://phpackages.com/badges/opensourcerefinery-random-string-generator/health.svg)](https://phpackages.com/packages/opensourcerefinery-random-string-generator)
```

PHPackages © 2026

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