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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Product Key Serial Number Generation

Product Key Serial Number Generation

Scheduled Pinned Locked Moved C#
help
8 Posts 4 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.
  • A Offline
    A Offline
    Alper Camel
    wrote on last edited by
    #1

    Hi, I am generating product key in the form of ; XXXXX-XXXXX-XXXXX-XXXXX I want to generate unique serial key related to this product key. I'd be so glad if someone help me. Thank you in advance.

    J E C 3 Replies Last reply
    0
    • A Alper Camel

      Hi, I am generating product key in the form of ; XXXXX-XXXXX-XXXXX-XXXXX I want to generate unique serial key related to this product key. I'd be so glad if someone help me. Thank you in advance.

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      Guid.NewGuid().ToByteArray() will give you 16 bytes.

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: God-as-Judge, God-as-Forgiver The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

      A 1 Reply Last reply
      0
      • J Judah Gabriel Himango

        Guid.NewGuid().ToByteArray() will give you 16 bytes.

        Tech, life, family, faith: Give me a visit. I'm currently blogging about: God-as-Judge, God-as-Forgiver The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

        A Offline
        A Offline
        Alper Camel
        wrote on last edited by
        #3

        But, GUID will generate RANDOM string, that will NOT related to my product key. Thank you.

        J 1 Reply Last reply
        0
        • A Alper Camel

          But, GUID will generate RANDOM string, that will NOT related to my product key. Thank you.

          J Offline
          J Offline
          Judah Gabriel Himango
          wrote on last edited by
          #4

          I don't understand, then, what you're trying to do. You want a product key, I gave you a piece of code to generate one. Are you saying you want to validate that? If so, validate with a server? Or just some special crafted key that is either valid or invalid?

          Tech, life, family, faith: Give me a visit. I'm currently blogging about: God-as-Judge, God-as-Forgiver The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

          1 Reply Last reply
          0
          • A Alper Camel

            Hi, I am generating product key in the form of ; XXXXX-XXXXX-XXXXX-XXXXX I want to generate unique serial key related to this product key. I'd be so glad if someone help me. Thank you in advance.

            E Offline
            E Offline
            ednrgc
            wrote on last edited by
            #5

            Check google for Elliptic Curve Cryptography

            A 1 Reply Last reply
            0
            • A Alper Camel

              Hi, I am generating product key in the form of ; XXXXX-XXXXX-XXXXX-XXXXX I want to generate unique serial key related to this product key. I'd be so glad if someone help me. Thank you in advance.

              C Offline
              C Offline
              CodingDragon
              wrote on last edited by
              #6

              Hi Have never done such a thing, but you could just run a for loop with an ID and then hash it. for(int i = ID; ID < limit; ID++) { // gethash() gives you a 9 digit number - theoretically not unique but very close. // collisions in hash is very rare string hash = ID.gethash().toString(); // if needed longer just do it again hash = hash.gethash().toString(); // format the string to look like xxxx-xxxx-xxxx-xxxx (insert the '-' etc) } Not pretty, but it would work.

              A 1 Reply Last reply
              0
              • C CodingDragon

                Hi Have never done such a thing, but you could just run a for loop with an ID and then hash it. for(int i = ID; ID < limit; ID++) { // gethash() gives you a 9 digit number - theoretically not unique but very close. // collisions in hash is very rare string hash = ID.gethash().toString(); // if needed longer just do it again hash = hash.gethash().toString(); // format the string to look like xxxx-xxxx-xxxx-xxxx (insert the '-' etc) } Not pretty, but it would work.

                A Offline
                A Offline
                Alper Camel
                wrote on last edited by
                #7

                Well your code give me some ideas for doing that. Thank you so much. I'll test this now...

                1 Reply Last reply
                0
                • E ednrgc

                  Check google for Elliptic Curve Cryptography

                  A Offline
                  A Offline
                  Alper Camel
                  wrote on last edited by
                  #8

                  This is definately what I'm looing for... Thank you so much... :)

                  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