Skip to content

Generating and Distributing Keys

Once you have published your protected application, the final step is to issue licenses to your customers. Whether you are fulfilling orders manually or automating the process through an e-commerce platform, VBA Padlock provides tools to generate secure, tamper-proof keys.

Time needed: 10–15 minutes


VBA Padlock supports two formats. Choosing the right one depends on your distribution method and security needs.

FeatureCompact (Short)Full (Long)
Typical Length~35 chars (e.g., A1B2-C3D4...)~120+ chars (Base64)
TechnologyHMAC-SHA256Ed25519 Elliptic Curve
Best forManual typing (phone, paper)Digital delivery (Email, Clipboard)
SecurityHighVery High (Digital Signature)
Max Runs SupportNoYes

If you fulfill orders manually or are testing your licensing, the built-in generator in VBA Padlock Studio is the easiest path.

Step 1: Collect the System ID (Hardware Lock)

Section titled “Step 1: Collect the System ID (Hardware Lock)”

If you have enabled Hardware Locking, you must first obtain the unique “System ID” from your user’s computer.

  1. Ask the user to open your application.

  2. The activation dialog will display their unique System ID.

  3. The user copies this ID and sends it to you via email or your order form.

    Activation dialog showing Hardware ID

  1. Open your project and go to Licensing FeaturesKey Generator.

  2. Enter the Registered Name (e.g., Jane Doe).

  3. Paste the System ID provided by the user.

  4. Choose the License Type and set any limits (Trial Days, Expiration Date).

  5. Click Generate.

    VBA Padlock Studio Key Generator Interface

Copy the generated key and send it to your user. They will enter it into the activation dialog to unlock the software.

Client Activation Dialog


For e-commerce automation (WooCommerce, Shopify, Stripe), you can generate keys programmatically using our PHP Key Generator SDK.

require_once('VBAPadlockKeygenAPI.php');
$vbp = new VBAPadlockKeygenAPI('vbp-YOUR-USER-ID');
$vbp->setApplicationMasterKey('{YOUR-PROJECT-GUID}');
// Optional: Binding to name and hardware
$vbp->setLicenseeName('Customer Name')
->setHardwareSystemID('ABCDE-12345')
->setMaxDays(365); // 1-year subscription
try {
$licenseKey = $vbp->getActivationKey();
echo "Your key: " . $licenseKey;
} catch (Exception $e) {
echo "Error: " . $e->getMessage();
}

To use the more secure Full format, you must provide your project’s ECC keys. Export these from Advanced Activation Options in VBA Padlock Studio.

$vbp->setFormat('full');
$vbp->setECCKeys($privateKeyHex, $publicKeyHex);
$vbp->setMaxRuns(50); // Limit to 50 executions
MethodDescription
setApplicationMasterKey($key)Required. Sets the Master Key from your project settings.
setHardwareSystemID($id)Ties the key to a specific computer’s Hardware ID.
setMaxDays($days)Sets the number of days the license is valid from today.
setExpireDate($date)Sets an absolute expiration date (YYYY/MM/DD).
setMaxRuns($runs)Sets the maximum number of executions (Full format only).
setLicenseeName($name)Binds the key to a specific user or company name.

Subscription Renewal

Generate a new key with a later Expiration Date. When the user enters the new key, it replaces the old one and extends their access.

Beta Testing

Issue a Time-Limited key with an absolute expiration date (e.g., 2026/12/31). All beta keys will stop working at the same time.

License Transfer

If a user replaces their PC, collect their Deactivation Certificate as proof of removal before issuing a new key.

Deactivation Certificate

Enterprise Bulk

Use the PHP SDK to generate dozens of keys in a loop for an enterprise client, mapping them to a list of provided System IDs.


Online Activation

Automate the entire process with an activation server. Read the guide →

Localization

Translate the activation dialogs for international users. Read the guide →

API Reference

Check the status of a license from your VBA code. View API →