LicenseFile
Static class in Oadm.Sdk.Licensing · Oadm.Sdk.dll
The license key of a commercial plugin: one line OADM1.<content>.<signature>, both parts base64url, the content the JSON of LicenseData. The vendor signs the content with an ECDSA P-256 key (SHA-256); OADM checks it with the public key of the plugin’s plugin.json, offline. The customer pastes the line or chooses a file that holds it (.oadmlicense); spaces and line breaks inside it are ignored. manage license keys and manage license sign call LicenseFile.CreateKeys and LicenseFile.Sign.
public static class LicenseFileMethods
Section titled “Methods”CreateKeys
Section titled “CreateKeys”static (string PrivateKeyPem, string PublicKey) CreateKeys()A new key pair for a vendor: the private key as PEM (PKCS#8, keep it secret, it signs every license) and the public key as base64 for license.publicKey in plugin.json.
static string Day(DateOnly day)“2027-12-31”.
static LicenseData? Peek(string text)What a license key says, without checking its signature (the summary of the license dialog before the server checks it); null when the text is no license key.
PublicKeyOf
Section titled “PublicKeyOf”static string PublicKeyOf(string privateKeyPem)The public key (base64) of a private key in PEM, e.g. to check that a key belongs to a plugin.
static string Sign(LicenseData data, string privateKeyPem)The license key for data, signed with the vendor’s private key (PEM).
Summary
Section titled “Summary”static string Summary(LicenseData data)“Licensed to ACME GmbH until 2027-12-31.” or “Licensed to ACME GmbH.”
Verify
Section titled “Verify”static PluginLicenseInfo Verify(string text, string publicKey, string pluginId, string serverId, DateOnly today)Checks a license key for a plugin on a server: the format, the signature with publicKey, the plugin, the server and the last day (today in the server’s time). Never throws for a bad key: the result says what is wrong (LicenseStatus.Invalid, LicenseStatus.WrongServer, LicenseStatus.Expired) or LicenseStatus.Valid with the content.
Fields
Section titled “Fields”Extension
Section titled “Extension”const string Extension = ".oadmlicense"The file name extension of a file that holds a license key.
MaxLength
Section titled “MaxLength”const int MaxLength = 16384Most characters of a license key; a longer text is refused unread.
Prefix
Section titled “Prefix”const string Prefix = "OADM1."The start of every license key (format version 1).