PHPackages                             ingress-it-solutions/generator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ingress-it-solutions/generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ingress-it-solutions/generator
==============================

PHP library for generating and parsing data

1.9.7(3y ago)0111MITPHPPHP &gt;=5.4CI failing

Since Oct 19Pushed 3y agoCompare

[ Source](https://github.com/ingress-it-solutions/generator)[ Packagist](https://packagist.org/packages/ingress-it-solutions/generator)[ RSS](/packages/ingress-it-solutions-generator/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (3)Versions (18)Used By (0)

 ![Generator is a library for generating and parsing Data with Private and Public Key]()
 Generator
==============================================================================================================================================================

[](#-generator)

 [ ![](https://camo.githubusercontent.com/ec31820650ecf6a3b3cfaa52f3f85c6f0a209f35b5105dd9c2073f81280bd5d1/68747470733a2f2f636f6465636f762e696f2f67682f696e67726573732d69742d736f6c7574696f6e732f67656e657261746f722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/ingress-it-solutions/generator) [ ![](https://camo.githubusercontent.com/e1887d37276710dea176e81f603aaee177fc80cb7466c7ed3af3951e6e8e3a2c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f747769747465722d74776565742d626c75652e7376673f7374796c653d666c61742d737175617265) ](https://twitter.com/home?status=PHP%20License%20by%20%40ziishaned%20http%3A//github.com/ingress-it-solutions/generator) [ ](https://twitter.com/ingressit)

`generator` is a library for generating and parsing data.

Requirements
------------

[](#requirements)

- PHP &gt;= 5.4
- OpenSSL

Generating Key Pair
-------------------

[](#generating-key-pair)

Make sure OpenSSL is configured on your machine.

1. Generate the Private key file by running the following command:

    ```
    openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048
    ```
2. Run the following command to generate public key:

    ```
    openssl rsa -pubout -in private_key.pem -out public_key.pem
    ```

Installation
------------

[](#installation)

```
composer require ingress-it-solutions/generator
```

Usage
-----

[](#usage)

Before running the following code make sure you have the `public_key` and `private_key` files.

### Generating

[](#generating)

Use the following code to generate the license key:

```
