1.0.3 • Published 3 years ago

simple-keygen v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Simple Keygen

forthebadge forthebadge

Simple Keygen is an NPM package to generate license files and also to verify the license files generated by it. This can be used to implement licensing for applications like Express, ElectronJS, etc.

Installation

To generate keys from the command line install simple keygen globally.

npm install -g simple-keygen

To verify the generated licenses in your application install the package in your project.

npm install simple-keygen

Usage

Generate an RSA Public/Private key pair and save it to your machine.
To generate licenses after installing the package globally, run the command simple-keygen on your terminal.

simple-keygen.png

To verify the generated and distributed licenses.

const SimpleKeygen = require('simple-keygen').

const keygen = new SimpleKeygen('absolute path to your public key of the private/public key pair')


const keyStatus = await keygen.verifyLicense('your license key')

//OR

keygen
  .verifyLicense("your license key")
  .then((keyStatus) => {
    console.log(keyStatus);
  })
  .catch((error) => {
    console.log(error);
  });

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT