narf / niceware
Niceware 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-09-14 19:31:25 UTC
README
PHP版的npm: niceware (GitHub: diracdeltas/niceware)
为什么?
我想写些有趣的东西。除非在这里给出更合理的解释,否则请假设其为实验性状态并自行承担风险!
公共API参考
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; }
注意:参数类型实际上不在方法签名中,但通过is_string()
,is_int()
调用进行验证。这是因为PHP的丑陋的strict_types
声明不可强制执行。