gladcodes / keygen
A fluent PHP random key generator.
Installs: 405 503
Dependents: 3
Suggesters: 0
Security: 0
Stars: 118
Watchers: 3
Forks: 19
Open Issues: 3
Requires
- php: >=5.4.0
Requires (Dev)
- phpunit/phpunit: ^5.7
This package is not auto-updated.
Last update: 2024-11-17 07:37:53 UTC
README
A fluent PHP random key generator.
Keygen is a PHP package that generates random character sequences known as keys. The package ships with built-in key generators for four key types namely: numeric, alphanumeric, token and byte. Its implementation effectively combines simplicity and expressiveness.
Installation
With Composer
The Keygen package can be installed easily with [Composer] - require the gladcodes/keygen
package from the command line.
$ composer require gladcodes/keygen
Alternatively, you can manually add the Keygen package to the composer.json
file of your project and then run composer install
from the command line as follows:
{ "require": { "gladcodes/keygen": "~1.1" } }
$ composer install
You can use it in your PHP code like this:
<?php require __DIR__ . '/vendor/autoload.php'; use Keygen\Keygen; printf("Your appID is %.0f", Keygen::numeric(12)->generate()); // Your appID is 878234290135
Usage and Documentation
Todos
- Write tests
License
The Keygen package is covered by the MIT
License.