473,404 Members | 2,174 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,404 software developers and data experts.

convert MAC addres to a unique serial number

my CPU mac address is BFEBFBFF000006F6

and my software name is : shefa

is there any function or encryption way in C# to generate a 24 digits (alpha
numeric) from both CPu MAC address and software name?

Aug 18 '07 #1
5 6867
Jassim Rahma wrote:
my CPU mac address is BFEBFBFF000006F6

and my software name is : shefa

is there any function or encryption way in C# to generate a 24 digits
(alpha numeric) from both CPu MAC address and software name?
Plenty.

You could just concatenate the two and pad with something.

If you have more specific requirements then tell us.

Arne
Aug 19 '07 #2
There are lots of ways to do this, it depends on what kind of encryption you
need and how strong it should be. For starters (not that I'd necessarily
recommend this) you could pad the combined string with zeroes to reach 24
characters, and then do simple XOR replacement on each character to get a new
string. The advantage of this (although it is very easy to break "the code")
is that XOR is 2-way - if you pass the encrypted string into the same method,
you get back the original, and no key is required.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"Jassim Rahma" wrote:
my CPU mac address is BFEBFBFF000006F6

and my software name is : shefa

is there any function or encryption way in C# to generate a 24 digits (alpha
numeric) from both CPu MAC address and software name?
Aug 19 '07 #3
On Sun, 19 Aug 2007 01:25:16 +0300, "Jassim Rahma"
<jr****@hotmail.comwrote:
>my CPU mac address is BFEBFBFF000006F6

and my software name is : shefa

is there any function or encryption way in C# to generate a 24 digits (alpha
numeric) from both CPu MAC address and software name?
How secure does this need to be?
Does it need to be reversible?

Your options include some or all of: Base64 encoding, a cryptographic
hash function, a cryptographic cypher.

Given that most cryptographic functions work on 128 bit (16 byte)
blocks then the Base64 encoding of a block will give you 24
characters,though it might contain "/" and will certainly contain "="
at the end.

rossum

Aug 19 '07 #4

i want to generate somthing like:

xxxx-xxxx-xxxx-xxxx-xxxx-xxxx

from the MAC address without letting the user know how it was generated.


"Arne Vajhøj" <ar**@vajhoej.dkwrote in message
news:46***********************@news.sunsite.dk...
Jassim Rahma wrote:
>my CPU mac address is BFEBFBFF000006F6

and my software name is : shefa

is there any function or encryption way in C# to generate a 24 digits
(alpha numeric) from both CPu MAC address and software name?

Plenty.

You could just concatenate the two and pad with something.

If you have more specific requirements then tell us.

Arne
Aug 19 '07 #5
Jassim Rahma wrote:
i want to generate somthing like:

xxxx-xxxx-xxxx-xxxx-xxxx-xxxx

from the MAC address without letting the user know how it was generated.
There are lots of ways of doing this.

You can just take the MAC in hex and take 1 hex digit of MAX + random
byte + second hex digit of MAC + random digit etc..

Or you can come up with more complex schemes.

If it is a licensing scheme, then you should be aware that
..NET assemblies are easy to decompile and check how the serial
is obtained and checked.

Arne
Aug 20 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Tony Clarke | last post by:
Hi, I'm trying to write a system thats used for about 50 clients that uses html forms and php to log details. The problem is that when a client loads the form page it's given a value which is...
8
by: Nitin | last post by:
Hello, We are trying to figure out how to get a unique identifier for a machine. Our application is a C# windows application that talks to our server via a webservice. Every time our webservice...
5
by: UJ | last post by:
Is there any number I can get that is truly unique for a computer that can't be changed? I want to have a system whereby I have a computer that accesses a web service based on some unique value...
29
by: Lauren Wilson | last post by:
Does anyone know how the following info is extracted from the user's computer by a Front Page form? HTTP User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107...
7
by: ML | last post by:
What is the best/easiest means to return the serial/volume number of the drive containing the OS using VB.NET? I'm looking to get this information as a unique ID for activation/registration of a...
0
by: Dennis Gearon | last post by:
Given: CREATE TABLE Usrs( usr_id SERIAL NOT NULL PRIMARY KEY, usr VARCHAR(64) NOT NULL UNIQUE ); CREATE TABLE Emails( email_id SERIAL NOT NULL PRIMARY KEY, email VARCHAR(128) NOT...
2
by: Benjamin Smith | last post by:
I have two tables like following: create table attendancereport ( id serial unique not null, staff_id integer not null references staff(id), schoolyear varchar not null references...
18
by: JJ | last post by:
Now I know this question has been asked many times, but I cannot seem to find a good site which summarises the methods possible in vb .net. I am after a way of producing a unique serial number...
6
by: Paul Bromley | last post by:
Ok - I have given up on trying to find the active IP address for a given PC. For licensing purposes I need to retrive a unique identifier from the PC that the program is installed on. The Hard disk...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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,...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.