473,378 Members | 1,495 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Serial Key Algorithm

Hi Everyone

Ok I really can say that I did first try and get an answer for this by googling a whole day long and I still couldn’t find what I’m looking for.

I will be releasing an application shortly which will be used by a few users (less than say 200) but I need a way to protect it and force the user to renew his subscription once his license expires a year after purchasing it.

What I had in mind was generating a serial key for each user after they have downloaded the app and made the payment. The serial key should be some encrypted piece of text with a fixed string followed by the date this key expires. For example:

Fixed string: “teststring”
Expiry date: “010109”

Unencrypted string: “teststring010109”

Somehow encrypt this string…

Encrypted string: “JSUDHSKEOWISL”

This is just an example but I think you get the general idea of what I’m trying to accomplish.

The main thing is I need to encrypt a string to a “friendly” encrypted string which can be used as a serial key so no “=”’s or other non-alphanumeric characters. I then need to be able to decrypt the key again in my application, verify that the fixed string exists and that the key has not yet expired. The encryption does NOT have to be very complicated since this will be used only by a few users which are all end users.

Any help would be greatly appreciated or if anyone has another idea I could use.

Thanks in advance
Stefan

*EDIT* Oops, forgot to mention that I'm doing it in C#, thanks.
Jan 4 '08 #1
3 1621
Plater
7,872 Expert 4TB
Have you looked at the System.Security.Cryptography namespace services? They offer methods for computing md5 hashes and the like, that could be helpful.
Combine that with the secure sockets implementation provided in other namespaces, you can probably accomplish your goal.
Jan 4 '08 #2
Hi, thanks, I will have a look at that.

Just one question: Isn't hashes just one way? What I mean is you can create the encrypted string, but there is no way to decrypt it again. I'm not too sure but I think I read that somewhere while trying to find a solution for my problem.

I will however have a look at those namespaces and report back here if I get anything working.

Thanks again
Stefan
Jan 5 '08 #3
Plater
7,872 Expert 4TB
md5 is one way I believe, yes. But that doesn't mean you can't use it.

Look up the way the public/private key stuff works and you'll see how you can use one-way hashes
Jan 7 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

79
by: Klaus Bonadt | last post by:
In order to protect software from being copied without licence, I would like to use something like a key, which fits only to the current system. The serial number of the CPU or the current...
2
by: a | last post by:
Does anyone know of any resources on creating trial version of your software written in .NET. I want to make a trial version and have people add a serial number that cannot be guessed. I'm sure...
3
by: ibwhoib | last post by:
Hey all, I caught a job where I have to write a linux daemon that communicates with a device connected to a serial port. Here are some details. I connect to the device in the standard fashion:...
6
by: Leandro Berti via DotNetMonster.com | last post by:
Hi All, I wrote a code to do serial communication with an equipament. When i use the code outside of threaded class it seens work properly, but when i put inside a class and execute a thread in...
13
by: Al the programmer | last post by:
I need to access the serial ports on my webserver from an asp.net page. I have no problem accessing the serial ports from a windows form application, but the code doesn't work in asp.net. I have...
4
by: ITstudent99 | last post by:
Hi every one I just I wonder if any one can help me and my colleague . We are developing a localization algorithm for mobile agent . and I need the java code that will help me to generate...
2
by: Ed | last post by:
Please help! I have a string of data as the result of serial to parallel hardware conversion. I need to decode this string into correct bytes. The start of a byte position is unknown. In this...
0
by: kenneth888 | last post by:
hi all, i would like to implement a serial controller controlling 7 segment display to c++. Can anyone just give me an algorithm so i can apply it to c++ coding??i dont need the code just plain...
4
by: max_mont | last post by:
Hi all, I'm a newbie in .NET technology. I've already developed Serial communication applications in C++ (WIN32). And I wanted to migrate to .NET technology. There is a serial component in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.