narf / niceware
Niceware library for PHP
dev-master
2016-11-25 14:39 UTC
Requires
- php: ^7
Requires (Dev)
- phpunit/phpunit: ^5.6 || ^6
This package is not auto-updated.
Last update: 2024-11-09 20:07:14 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.