narf/niceware
Niceware library for PHP
Maintainers
dev-master
2016-11-25 14:39 UTC
Requires
- php: ^7
Requires (Dev)
- phpunit/phpunit: ^5.6 || ^6
Suggests
None
Provides
None
Conflicts
None
Replaces
None
MIT e84c6cb1971f936ee2782cac1b2ea1bd6951ce7c
- Andrey Andreev <narf.woop@devilix.net>
generatordictionarycryptographypasswordencryptionrandomcryptopassphrasedicewarepassword generatorentropyniceware
This package is not auto-updated.
Last update: 2026-06-21 04:32:17 UTC
README
PHP port of npm: niceware (GitHub: diracdeltas/niceware)
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
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.
