
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
cryptolens
Advanced tools
This library contains helper methods to verify licenses in NodeJS.
npm add cryptolens
To verify a license key, you can use the code below. The RSAPublicKey, token and the product id can be found on this page.
const key = require('cryptolens').Key;
const Helpers = require('cryptolens').Helpers;
var RSAPubKey = "Your RSA Public key, which can be found here: https://app.cryptolens.io/User/Security";
var result = key.Activate(token="Access token with with Activate permission", RSAPubKey, ProductId=3349, Key="GEBNC-WZZJD-VJIHG-GCMVD", MachineCode=Helpers.GetMachineCode());
result.then(function(license) {
// success
// Please see https://app.cryptolens.io/docs/api/v3/model/LicenseKey for a complete list of parameters.
console.log(license.Created);
}).catch(function(error) {
// in case of an error, an Error object is returned.
console.log(error.message);
});
Assuming the license key verification was successful, we can save the result in a file so that we can use it instead of contacting Cryptolens.
First, we need to add the reference to the helper methods:
const Helpers = require('cryptolens').Helpers;
We can now proceed and save it as a string.
var licenseString = Helpers.SaveAsString(license);
When loading it back, we can use the code below:
var license = Helpers.LoadFromString(RSAPubKey, licenseString);
If you want to make sure that the license file is not too old, you can specify the maximum number of days as shown below (after 30 days, this method will return null).
var license = Helpers.LoadFromString(RSAPubKey, licenseString, 30);
FAQs
Client API for NodeJS to access Cryptolens Software Licensing API.
The npm package cryptolens receives a total of 142 weekly downloads. As such, cryptolens popularity was classified as not popular.
We found that cryptolens demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.