PHPackages                             bart/licensee - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. bart/licensee

ActiveLibrary[Security](/categories/security)

bart/licensee
=============

Simple PHP class for license generation and verification based on openssl signatures

v1.0.0(12y ago)22535MITPHPPHP &gt;=5.3.0

Since May 11Pushed 12y ago2 watchersCompare

[ Source](https://github.com/bart/licensee)[ Packagist](https://packagist.org/packages/bart/licensee)[ RSS](/packages/bart-licensee/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Licensee
========

[](#licensee)

[![Latest Stable Version](https://camo.githubusercontent.com/cfa787bbae91e0ccafffb347a6d3ce6773bf6cb5ae5e1524c238fb2af35bf5e8/68747470733a2f2f706f7365722e707567782e6f72672f626172742f6c6963656e7365652f762f737461626c652e706e67)](https://packagist.org/packages/bart/licensee) [![License](https://camo.githubusercontent.com/8e49ebf585859ec4d75697482c6333fa33bff2efcc02158a611762eb68930492/68747470733a2f2f706f7365722e707567782e6f72672f626172742f6c6963656e7365652f6c6963656e73652e706e67)](https://packagist.org/packages/bart/licensee)[![ProjectStatus](https://camo.githubusercontent.com/dc2b5f42a5370f017c8c8def26616e85503674c0de241f14cc412ab29a85540e/687474703a2f2f7374696c6c6d61696e7461696e65642e636f6d2f626172742f6c6963656e7365652e706e67)](http://stillmaintained.com/bart/licensee)

A simple PHP class for license generation and verification based on openssl signatures

Usage
-----

[](#usage)

Using the Licensee class is as easy as pie, because it follows the PSR-0 namespace standard.

1. Add `"bart/licensee":"dev-master"` to your `composer.json` `require-dev`
2. Run `composer update`
3. Enjoy!

> **Note:** If you developing with the amazing [Laravel 4 framework](http://www.laravel.com), you can add an alias: 'License' =&gt; 'Bart\\Licensee\\License'

Methods
-------

[](#methods)

```
createLicense($data, $private_key_path, [$license_path])
storeLicense($license_path)
validateLicense($license_path, $public_key_path)
getDataAndValidateLicense($license_path, $public_key_path)
createKeypair([$private_key_path], [$public_key_path])

```

Example
-------

[](#example)

```
$lic = new License();

// The array we want to create a license from
$data = array(
  'licensee' => 'Company name',
  'version' => '1.0',
  'valid_until' => time() + 60*60*24,
  'key' => sha1(uniqid(true))
);

// Create a new public and private key
$lic::createKeypair('/tmp/private.pem', '/tmp/public.pem');

// Create the license
$lic->createLicense($data, '/tmp/private.pem', '/tmp/license.lic');

// Validate the license and get the data back
$valid_data = $lic->getDataAndValidateLicense('/tmp/license.lic', '/tmp/public.pem');

```

License
-------

[](#license)

The Licensee package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4387d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d61306f91e18e357adc1eab181fdf6a8fd7d28cec97fca2420951d086a2cfff?d=identicon)[bart](/maintainers/bart)

---

Top Contributors

[![bart](https://avatars.githubusercontent.com/u/5200235?v=4)](https://github.com/bart "bart (4 commits)")

---

Tags

licensesignatureopenssl

### Embed Badge

![Health badge](/badges/bart-licensee/health.svg)

```
[![Health](https://phpackages.com/badges/bart-licensee/health.svg)](https://phpackages.com/packages/bart-licensee)
```

###  Alternatives

[phpseclib/phpseclib

PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.

5.6k434.8M1.3k](/packages/phpseclib-phpseclib)[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[ass/xmlsecurity

The XmlSecurity library is written in PHP for working with XML Encryption and Signatures

955.6M30](/packages/ass-xmlsecurity)[mmeyer2k/dcrypt

A petite library of encryption functionality for PHP

98727.2k1](/packages/mmeyer2k-dcrypt)[payu/apple-pay

ApplePay Token Decoder

51983.2k](/packages/payu-apple-pay)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
