Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. Hashing in license key / serial key management

Hashing in license key / serial key management

Scheduled Pinned Locked Moved IT & Infrastructure
algorithmscryptographytutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    scchan1984
    wrote on last edited by
    #1

    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

    D 1 Reply Last reply
    0
    • S scchan1984

      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

      D Offline
      D Offline
      Dan Neely
      wrote on last edited by
      #2

      A good hash is nonreversable, so no.

      S 1 Reply Last reply
      0
      • D Dan Neely

        A good hash is nonreversable, so no.

        S Offline
        S Offline
        scchan1984
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups