开发者

Generate serial numbers for each product key and validate them [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. 开发者_运维知识库

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 7 years ago.

Improve this question

I have a piece of software with different unlockable modules. Each module has to be purchased separately. I've started with assigning a unique key to each module via Guid.NewGuid method.

Now I have to provide users with serial numbers for activating those upgrades, and then the numbers will need to be validated:

  1. Serial number belongs to specific product key
  2. Serial number is valid for specific product key.

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

Thanks.


Perhaps you can generate some sort of hash based on the user's name and company. Then take that hash and generate some sort of combined hash based on the first hash and the product's GUID. Use that final hash to form your key.

Then your program does the same thing (the user must enter their name and company) and if it comes up with the same final hash value, consider it to be valid.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜