Application licence code

  • Thread starter Thread starter Peter B
  • Start date Start date
P

Peter B

Are there any good algorithms for generating short licence codes (4-6digits)
in CF?

I have never done this before so I would be greatful for any help.

thanks,

Peter
 
I might add that you are given the serial number of the CF-device and a
secret key of a certain length.
 
Thanks for the idea, unfortunately the hashcode function doesn't return a
very unique key when "hashing" numbers that are very similar.

This is an example of the output:

string to hash - resulting hashcode
000018545 - 490428440
000018546 - 490428443
000018547 - 490428442
000018548 - 490428437
000018549 - 490428436

I need more uniqueness, the code need to change completely even if the
serial number changes only by one digit!

I don't have much experience in the field but I guess I could use
cryptography algorithms such as RSA, MD5? Any suggestion which path I should
take here?

thanks,

Peter
 
Just an idea, but what about using a simple Checksum algorithm like Adler or CRC32?

Greetz

Jens
 
Back
Top