2017 © Pedro Peláez
 

library licensing

A package to assist with the generation and validation of license keys.

image

ahead4/licensing

A package to assist with the generation and validation of license keys.

  • Tuesday, June 19, 2018
  • by ahead4
  • Repository
  • 4 Watchers
  • 0 Stars
  • 6,477 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 10 % Grown

The README.md

Licensing

Creating a new keypair.

Before you're able to create a license, you must create a private and public keypair. The private key should be kept in secure storage and should only be used to generate new licenses. The public key will need to be generated alongside the license key in order to perform verification on the license data., (*1)

createKeypair('/path/to/store/private.key', '/path/to/store/public.key');

?>

Creating a license.

A license is a simple array of data, which gets signed by the private key you previously created. This signature is then embedded into the license to allow you to verify it later to ensure the license has not been modified or tampered with in any way., (*2)

 [
        'name' => 'Joe Bloggs',
    ],
    'features' => [
        'gallery',
        'shop',
    ],
];
$license = $licensing->createLicense($data, '/path/to/private.key');

?>

Verifying a license.

A license can be verified by providing the path to the license and the path to the public key., (*3)

verifyLicense('/path/to/license.txt', '/path/to/public.key');

?>

Getting the data from a license.

In most cases you will simply want to get back the original array of data that you created the license with. NOTE: You do not need to verify the license before calling this method as it will automatically perform this check and will instead return null if the license is invalid., (*4)

getLicenseData('/path/to/license.txt', '/path/to/public.key');

?>

The Versions

19/06 2018

dev-master

9999999-dev

A package to assist with the generation and validation of license keys.

  Sources   Download

The Requires

 

The Development Requires

by Ahead4 Limited

19/06 2018

1.0.2

1.0.2.0

A package to assist with the generation and validation of license keys.

  Sources   Download

The Requires

 

The Development Requires

by Ahead4 Limited

26/09 2017

1.0.1

1.0.1.0

A package to assist with the generation and validation of license keys.

  Sources   Download

The Requires

 

The Development Requires

by Ahead4 Limited

09/02 2016

1.0.0

1.0.0.0

A package to assist with the generation and validation of license keys.

  Sources   Download

The Requires

 

The Development Requires

by Ahead4 Limited