By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,730 Members | 1,156 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,730 IT Pros & Developers. It's quick & easy.

convert MAC addres to a unique serial number

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a

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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.