473,789 Members | 2,550 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Serial Key Algorithm

17 New Member
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: “teststring0101 09”

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 1650
Plater
7,872 Recognized Expert Expert
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
StefanPienaar
17 New Member
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 Recognized Expert Expert
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
14121
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 operating system would be appropriate. However, I do not know how to retrieve the information. Could you help? Klaus
2
1653
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 its some kind of algorithm is involved. Thanks for any advice! -matt
3
10791
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: fd = open(device, O_RDWR | O_NOCTTY | O_NDELAY); I set the port options:
6
2874
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 the first seconds the communication is ok, later i receive read/write error. I?ve been in MSDN site and there i discover that the read/write error is a INVALID_HANDLE problem. But why??? I just create the serial communication file and use it....
13
4834
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 been told it is not possible to access the serial ports from asp.net. The application is used to control custom hardware. The hardware is connected to a PC through serial ports. Our customer wants to control the hardware from a remote...
4
1880
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 serial numbers to assign them for mobile agents I hope that someone will help me Thanks
2
2811
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 particular case, part of my data is as follows. Serial data string: (not rs232, straight serial data) 01001010010010010101001001001001010100100010010001001010 This was read through a shift register to get 8-bit bytes to store in memory as:
0
984
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 simple pseudo code will do. The controller decodes incoming hexadecimal encoded in ASCII text stream.Assume input stream is stored in an input buffer from where the command handler reads each character. Valid commands are stored in the command...
4
4819
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 framework to read and write on serial port. I would like to make asynchronous reception. I saw that we can pass a delegate to the serial class which is call when some data is readen on the port.
0
9663
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10404
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10136
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9016
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6765
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4090
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2906
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.