Skip to Content
New release 11.5 available 🎉

User Key Format

The User Key format in Babel Licensing can be customized using a special syntax that allows you to define the structure, length, and character types of generated keys. This flexibility enables you to create user keys that align with your organization’s naming conventions and security requirements.

Format Syntax

When configuring the User Key format, you can use the following placeholders:

PlaceholderDescription
{TOKEN:NN}Generates UPPERCASE alphanumeric characters (letters and digits) of length NN
{token:NN}Generates lowercase alphanumeric characters (letters and digits) of length NN
{HEX:NN}Generates UPPERCASE hexadecimal characters (0-9, A-F) of length NN
{hex:NN}Generates lowercase hexadecimal characters (0-9, a-f) of length NN
{DEC:NN}Generates decimal digits (0-9) of length NN

In each placeholder, NN represents the number of characters to generate. For example, {TOKEN:5} will generate 5 uppercase alphanumeric characters.

Format Examples

Here are some examples of User Key formats and what they might generate:

  1. Standard Format with Separators:

    {TOKEN:5}-{TOKEN:5}-{TOKEN:5}

    Example output: AB3C7-XY29P-RTK84

  2. Product-Specific Prefix:

    PRO-{TOKEN:8}-{HEX:4}

    Example output: PRO-KD83P7LM-E5F2

  3. Mixed Case with Multiple Segments:

    {TOKEN:4}{token:4}-{HEX:6}

    Example output: X5P3ab7c-A7F9D2

  4. Numeric License with Hyphens:

    {DEC:4}-{DEC:4}-{DEC:4}

    Example output: 7391-2658-9034

  5. Complex Format with Mixed Types:

    LIC-{TOKEN:3}{hex:4}-{DEC:3}-{HEX:5}

    Example output: LIC-QR5b7a2-847-D39F7

  6. Enterprise License Format:

    ENT-{TOKEN:5}-{DEC:3}-{TOKEN:5}

    Example output: ENT-XC73P-592-KLMNR

Best Practices

When designing your User Key format, consider the following best practices:

  1. Balance Readability and Security: Longer keys provide more security, but can be difficult for users to type or communicate. Including separators (like hyphens) can improve readability.
  2. Include Identifying Prefixes: Adding prefixes like “STD-” or “ENT-” can help users and support staff quickly identify license types.
  3. Consider Key Length: For most applications, a total length of 12-20 characters provides a good balance between security and usability.
  4. Avoid Ambiguous Characters: When choosing your format, be mindful that some characters like ‘0’ (zero) and ‘O’ (capital o) can be confused. Using {HEX:NN} can help avoid some of these ambiguities.
  5. Test Readability: Ensure the key format is easily readable for customer support scenarios, where keys might need to be verbally communicated.

By carefully designing your User Key format, you can create keys that are not only secure but also user-friendly and aligned with your product branding.

Last updated on