Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::runtime::LicenseValidator Class Reference

License key validator — checks v1 RSA-signed or v2 AES-256-GCM keys. More...

#include <license.hpp>

Public Member Functions

 LicenseValidator ()=default
void set_public_key (std::string_view pem)
 Set the RSA public key (PEM format) for v1 signature verification.
void set_shared_secret (const uint8_t *secret_32, size_t secret_size)
 Set the 32-byte symmetric secret used to decrypt v2 license keys.
LicenseStatus validate (std::string_view license_key) const
 Validate a license key string.
std::optional< LicenseInfo > validate_and_parse (std::string_view license_key) const
 Validate and extract license info.
LicenseStatus validate_file (std::string_view path) const
 Validate a license key file.
bool is_valid_for_machine (const LicenseInfo &info) const
 Check if a license is valid for this machine.

Detailed Description

License key validator — checks v1 RSA-signed or v2 AES-256-GCM keys.

The public key (v1) and shared secret (v2) are embedded in the plugin; the matching private key (v1) and shared secret (v2) stay on the server.

Constructor & Destructor Documentation

◆ LicenseValidator()

pulp::runtime::LicenseValidator::LicenseValidator ( )
default

Member Function Documentation

◆ is_valid_for_machine()

bool pulp::runtime::LicenseValidator::is_valid_for_machine ( const LicenseInfo & info) const

Check if a license is valid for this machine.

◆ set_public_key()

void pulp::runtime::LicenseValidator::set_public_key ( std::string_view pem)

Set the RSA public key (PEM format) for v1 signature verification.

Optional if the plugin no longer ships v1 keys.

◆ set_shared_secret()

void pulp::runtime::LicenseValidator::set_shared_secret ( const uint8_t * secret_32,
size_t secret_size )

Set the 32-byte symmetric secret used to decrypt v2 license keys.

Optional if the plugin still only ships v1 keys.

◆ validate()

LicenseStatus pulp::runtime::LicenseValidator::validate ( std::string_view license_key) const

Validate a license key string.

Auto-detects v1 vs v2 via detect_license_format() and dispatches to the matching path.

◆ validate_and_parse()

std::optional< LicenseInfo > pulp::runtime::LicenseValidator::validate_and_parse ( std::string_view license_key) const

Validate and extract license info.

◆ validate_file()

LicenseStatus pulp::runtime::LicenseValidator::validate_file ( std::string_view path) const

Validate a license key file.


The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/runtime/include/pulp/runtime/license.hpp