PHP port of npm: niceware (GitHub: diracdeltas/niceware)
I wanted to write something for fun. Until I put a more reasonable explanation here - assume EXPERIMENTAL status and use at your own risk!
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.