Advertisement Jump to content
Sign in to follow this  
Zoomby

Generate Serial-Key

This topic is 4761 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, how can I generate a serial key (like "w9rt-we25-wbvt-344") from a string? What algorithms are used? bye, Chris

Share this post


Link to post
Share on other sites
Advertisement
The obvious way: a hashing function. Applying some mathematical hash mechanism to the username to output a number which is virtually unique to the input.

Algorithms like MD4/5, SHA-*, CRC, etc.

Recommend that you salt the value well, and employ multiple algorithms. Serial key generators are notoriously easy to create and exploit from programs.

Share this post


Link to post
Share on other sites
If you are worried about cracks and keygens, and are selling this, use multiple checks within the program, as well as multiple functions to calculate the serial, as well as just random calculations that have no effect on the output to throw off a keygener. Most you do the time its: Decompile->Find serial code -> rip to keygen, but you can add stuff in there that makes it just that much harder.

Share this post


Link to post
Share on other sites
Just a note from a more end user perspective: some companies ensure that their keys only consist of characters that are very easy to distinguish i.e. they never include I, 1, 7 o 0 etc in their keys

Share this post


Link to post
Share on other sites
Quote:
Original post by thesimon
Just a note from a more end user perspective: some companies ensure that their keys only consist of characters that are very easy to distinguish i.e. they never include I, 1, 7 o 0 etc in their keys


This is easy enough via most hashing algorithms since they return large numbers. Hex characters are difficult to mis-judge.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!