For an online web application, we need to allow customers to subscribe to certain services online. The principle is that we generate a certain subscription code for the customer, which he can uses to subscribe.
The info that we need to include in the subscription code is:
1. The service code (number to which the customer is authorised to subscribe) (code from 0 to 999)
Example: 78, 456, etc.
2. The customer number (number from 0 to 99999 OR number from T0 to T9999). T being a ‘temporary customer’
Example: 89, 67890, T56, T3456
It is clear that we cannot make a concatination of the two items above (e.g. 78-89). This should allow misuse of the code. For example, a customer receiving the code 678-T3456 could subscribe with this code, but he could also simply add 1 to the service part of the code and subscribe as 679-T3456.
To prevent this, we need a mechanism that converts the original code to a new code. A simple way is to do encryption of the code and let the user enter the encrypted code. The problem is that by encrypting, special characters are introduced such as (-)°, etc. and that we do not want to give such a code to our customers.
An answer to the above is that we do an encoding of the encrypted code. This however will make the code too long and is again not what we want.
Here are the rules of what we expect:
1. The new code may not be transparent; a user may not see how the code is structured to determine a new code. This means that a certain encryption, check, encoding, etc. is required.
2. The code should have a fixed length of 8 characters (2 groups of 4 characters). This is a good format for entering in a text box.
3. The code should use a combination of the following characters: A to Z (only upper case !) and 1 to 9 with the exception of the letter O and the letter I (not included to prevent misreading of 0 and O and I and 1).
4. There must be a convert mechanism (from original code to new code) and de-convert mechanism (from new code to original code).
5. The convert mechanism must be written in .Net, C#
Examples of a new valid code:
PLEASE ONLY REPLY IF YOU ARE FAMILIAR WITH THIS TYPE OF WORK
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Exclusive and complete copyrights to all work purchased.
.Net C# code or component