Skip to content

Software License Dongle for Node.js and Electron

The Node binding ships prebuilt natives, so npm install does not drag node-gyp, Python and a C++ toolchain onto your build machines.

npm install @keynub/licdongleCode language: Bash (bash)
import { Dongle } from '@keynub/licdongle';

const dongle = await Dongle.open();        // first dongle found
if (!(await dongle.isGenuine())) throw new Error('no genuine KeyNub');

await dongle.sessionOpen();
const license = await dongle.recordRead('license');
await dongle.close();Code language: JavaScript (javascript)

Electron: check in the main process

This is the one Electron-specific thing worth saying. Do the dongle work in the main process, not the renderer. A renderer is a browser context: its JavaScript is shipped as readable source inside your app bundle, and anyone can open devtools against it. Anything you decide in the renderer, the user can re-decide.

Better still, decrypt the data your application needs in the main process and pass the result over IPC, rather than passing a boolean the renderer is trusted to honour.

And the rule that matters in every language: do not branch on a boolean. Encrypt data your program genuinely needs with appEncrypt at build time and decrypt it through the dongle at run time, so removing the check leaves the program with nothing to compute rather than a working unlicensed copy.

All supported languages · Buy a KeyNub · Ask us something

KeyNub

A project of AB-Tools GmbH.
Address: Marsstraße 78 · 80335 Munich · Germany
Phone: +49 89 38898588 · Fax: +49 89 38898589
E-mail: info@keynub.com

Managing Director: Andreas Breitschopp
Commercial register HRB 202859 · Amtsgericht München (Munich local court)
VAT ID DE268720895 · Munich tax office for corporations
Grenke Bank AG · IBAN: DE49201304000060270139 · BIC: GREBDEH1XXX

Developers · Payment Methods · Shipping · Terms & Conditions · Right of Withdrawal · Privacy Policy · Legal Notice