PHPackages                             narf/niceware - 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. narf/niceware

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

narf/niceware
=============

Niceware library for PHP

061PHP

Since Nov 25Pushed 9y ago1 watchersCompare

[ Source](https://github.com/narfbg/Niceware)[ Packagist](https://packagist.org/packages/narf/niceware)[ RSS](/packages/narf-niceware/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Niceware for PHP
================

[](#niceware-for-php)

[![Build Status](https://camo.githubusercontent.com/1fcc4f3daaedc614ec4d91b7fff49be76da47de275d64a5f18d95e6724ea2746/68747470733a2f2f7472617669732d63692e6f72672f6e61726662672f4e696365776172652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/narfbg/Niceware)

PHP port of [npm: niceware](https://www.npmjs.com/package/niceware) ([GitHub: diracdeltas/niceware](https://github.com/diracdeltas/niceware))

Why?
----

[](#why)

I wanted to write something for fun. Until I put a more reasonable explanation here - assume EXPERIMENTAL status and use at your own risk!

Public API Reference
--------------------

[](#public-api-reference)

```
namespace Narf\Niceware;

class Narf\Niceware\Niceware {

	public static function generatePassphrase(int $size): string;
	public static function bytesToPassphrase(string $bytes): string;
	public static function passphraseToBytes(string $passphrase): string;

}
```

*Note: The parameters types are not actually in the method signatures, but validated via `is_string()`, `is_int()` calls. This is because PHP's ugly `strict_types` declaration is non-enforceable.*

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/515594394e6b1a9984fc0647b7c48c5edec69f1a5b0527e494ab19e30e063677?d=identicon)[Narf](/maintainers/Narf)

---

Top Contributors

[![narfbg](https://avatars.githubusercontent.com/u/1058011?v=4)](https://github.com/narfbg "narfbg (9 commits)")

### Embed Badge

![Health badge](/badges/narf-niceware/health.svg)

```
[![Health](https://phpackages.com/badges/narf-niceware/health.svg)](https://phpackages.com/packages/narf-niceware)
```

###  Alternatives

[cebe/assetfree-yii2

A meta package that allows you to install yii2 without composer-asset-plugin.

50105.4k4](/packages/cebe-assetfree-yii2)

PHPackages © 2026

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