Create serial numbers for each product key and check them

I have a piece of software with various unlockable modules. Each module must be purchased separately. I started by assigning a unique key to each module using the Guid.NewGuid method.

Now I have to provide users with serial numbers to activate these updates, and then the numbers should be confirmed:

  • Serial number refers to a specific product key.
  • The serial number is valid for a specific product key.

Any suggestions on how to create a serial number based on a Guid product key and perform the reverse operation for verification?

Thanks.

0
source share
1 answer

Perhaps you can create some kind of hash based on the username and company. Then take this hash and create some kind of combined hash based on the first hash and product GUID. Use this final hash to form your key.

Then your program does the same (the user must enter his name and company), and if he has the same final hash value, consider it valid.

+6
source

All Articles