danrovito/uniquekeygenerator

Generates a unique key based on IP or numeric string

0.3.2 2017-05-09 15:13 UTC

This package is auto-updated.

Last update: 2024-11-29 05:32:33 UTC


README

Latest Stable Version Total Downloads License StyleCI

This package is designed to create a unique key (WGDL2U-HF3DH7-FYP5DT-RVT5T6-P5FFXX) to use as a possible identity or token.

Installation

You can install this package via composer using the following command

composer require danrovito/uniquekeygenerator

Usage

To use this package you'll need to set the namespace first

use GenerateKey\GenerateKey;

Then call the class

$key = new GenerateKey();

From there you can call the makeKey function. There are 3 ways to generate a unique key

You can send an empty request

$key->makeKey();

You can send an IP address

$key->makeKey('192.168.1.1');

or you can send a numeric string

$key->makeKey('12345678');

If you send an IP or string, the last section of your key will be the same each time if the value you input is the same.

The generated key will look like this

WGDL2U-HF3DH7-FYP5DT-RVT5T6-P5FFXX

Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.