Feature to add the user custom data to a key

Post here any topics that related to Enigma Protector, its functionality, your misunderstanding, offers to improvements etc etc etc
Post Reply
Tim Vau
Posts: 15
Joined: Mon Dec 05, 2022 5:32 pm

Feature to add the user custom data to a key

Post by Tim Vau »

Hi,

I want to use custom data inside a registration key for a custom keygen. At the moment, I see only the standard use of the TKeyGenParams structure without custom data. I want to add additional data like:

Code: Select all

TKeyGenParams = record
    ...
    CustomData           : PAnsiChar; 
  end;
It would be something like a watermark or some kind of unique identifier in the key.
When verifying the key, it would be useful to receive this information for identification, like:

Code: Select all

Valid registration key.
Key information: 
Created: 17 April 2007
Expiration date: 1 January 2008
Unlock crypted section #1
Unlock crypted section #7
Unlock crypted section #16
Watermark ID 012345
Are there any chances to use similar now? I might have missed something, but I don't think I found the right information in the help file.
Enigma
Site Admin
Posts: 3081
Joined: Wed Aug 20, 2008 2:24 pm

Re: Feature to add the user custom data to a key

Post by Enigma »

Hi Tim, there is no way to add custom data like you are asking for.
But there are scenarios that could be used:
1. Depending on amount of data, it is possible to use crypted sections of the key, these are 16 bit constants, that you may hardcode into the key.
2. If 16 bit of information is not enough, you may hardcode any information inside registration name. If you have a binary data, use base64 encoding and append registration name with it. When needed, extract registration name using EP_RegLoadKeyEx (check if it is valid for the key using EP_RegLoadAndCheckKey), extract base 64 encoded string from name and decode it.

Hope described ways are clear enough.
Post Reply