Search guides and the APICtrl K
  1. API reference
  2. Plugin model

license_runtime.h

Sonorie licensing RUNTIME -- the platform half of license.h.

#include <sonore/license_runtime.h>
On this page

Design notes

license.h is pure verify crypto: it takes a machine id as a PARAMETER and has no idea what a machine, a file or a user is. That separation is deliberate -- the crypto is provable in isolation and the same header runs in a unit test with no OS at all. This header is the other half, and every line of it is POLICY rather than mathematics: where the device id comes from, where the .lic lives, what an unlicensed build sounds like, and what the user sees when they have to activate.

THE CONTRACT, which the rest of the design follows from: after ONE network moment (the server must witness a device once to count seats) every later check is pure local computation for the token's whole year -- an embedded public key and a file. NOTHING here may ever gate audio or UI on a network call. That is why activation is a PASTE: the user takes their machine code to sonorie.com/activate on any device and brings a token back. It works on an air-gapped machine, it works on Linux where there is no HTTP client to speak of, and it needs no TLS stack inside the plugin.

Accepted losses, both industry-standard: an offline machine re-activates once a year, and moving the clock backwards defeats expiry.

This header costs nothing unless a build opts in. SONORE_LICENSE_PRODUCT and SONORE_LICENSE_PUBKEY are what the marketplace generator defines; a personal export defines neither and compiles byte-identically to before.

Types 2

The .lic payload, v2: token, then email, then the purchase key.

The email and key ride along so the plugin can RENEW silently before the token expires, without asking the user for anything again. An activation done through the web page has no key to store, and simply cannot auto-renew -- which is a smaller loss than it sounds, because that user already knows where the activation page is.

One plugin instance's view of the licence.

licensed() is read on the AUDIO thread every block, so the flag is atomic and nothing else here is touched from there. Everything that reads a file or verifies a signature happens on the main thread: at construction, when an editor opens, and when the user pastes a code.

Functions 12

Enums 1

↑↓ to move↵ to openEvery public name in the headers, and every guide