Download the PHP package hylianshield/key-generator without Composer
On this page you can find all versions of the php package hylianshield/key-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hylianshield/key-generator
More information about hylianshield/key-generator
Files in hylianshield/key-generator
Package key-generator
Short Description Generate serials / API keys.
License Apache-2.0
Informations about the package key-generator
Introduction
Generate, encode and decode serials and API keys.
Installation
Command line
Command | Alias | Usage | Description |
---|---|---|---|
bin/generate-key |
composer generate-key |
generate-key [<num-groups>] |
Generate an API key with the supplied number of groups. |
bin/encode-key |
composer encode-key |
encode-key <number>[, ...<number>] |
Encode a key for the given list of numbers. |
bin/decode-key |
composer decode-key |
decode-key <key> |
Decode the given key into a numerical sequence. |
To see a complete result of the described functionality, try the following:
The output will be similar to:
Usage
Note that when encoding or generating a key, the numerical sequence will be stored in the key object. When a key is created manually, by supplying a string, the key will not be automatically decoded into a numerical sequence. This is to improve performance.
Security
The numbers are generated using an implementation of a number generator. By default, it generates numbers using the CSPRNG implementation introduced in PHP 7.
For more control over key generation, try implementing a custom number generator.
For specific and fine-grained control, create a custom number sequence and let that be encoded.
All versions of key-generator with dependencies
hylianshield/number-generator Version ^1.0
hylianshield/base32-crockford Version ^1.0.1