simple-keygen
v1.0.3
Published
Simple keygen and verifier using Node.JS crypto module
Downloads
10
Maintainers
Readme
Simple Keygen
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.
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.