Hashing in license key / serial key management
-
Hi, I have a string (a mainkey + a salt). I want to hash it and get the hashed value. Is it possible to get back the string from the hased value with the same algorithm and given the mainkey? For example, I have 3 strings: mainkeySalt1 mainkeySalt2 mainkeySalt3 and their hashed values are: a for mainkeySalt1 b for mainkeySalt2, mainkeySalt3 (unfortunately, mainkeySalt2 and mainkeySalt3 have the same hashed values b) Any ideas? I do this kind of hashing and unhashing jobs for license key / serial key management (for user input during installation). What I want to do is do have a mainkey plus some parameters and then get a hashed value, i.e. the serial key. The serial key will then passed to a unhashing function, e.g. f(key, mainkey) returning yes and no (yes means mainkey is valid and no means mainkey is invalid) Any other ways can archieve the license key / serial key management that I want to do? Thanks
-
Hi, I have a string (a mainkey + a salt). I want to hash it and get the hashed value. Is it possible to get back the string from the hased value with the same algorithm and given the mainkey? For example, I have 3 strings: mainkeySalt1 mainkeySalt2 mainkeySalt3 and their hashed values are: a for mainkeySalt1 b for mainkeySalt2, mainkeySalt3 (unfortunately, mainkeySalt2 and mainkeySalt3 have the same hashed values b) Any ideas? I do this kind of hashing and unhashing jobs for license key / serial key management (for user input during installation). What I want to do is do have a mainkey plus some parameters and then get a hashed value, i.e. the serial key. The serial key will then passed to a unhashing function, e.g. f(key, mainkey) returning yes and no (yes means mainkey is valid and no means mainkey is invalid) Any other ways can archieve the license key / serial key management that I want to do? Thanks
-
Thanks, Then what is the algorithm of checking whether serial keys are valid or not. Simply compare with the hardcoded one inside the program? Is there any way that I can do to encrypt information inside serial keys?