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. General Programming
  3. C#
  4. How to randomly generate a number or characters in an Authorization Class file

How to randomly generate a number or characters in an Authorization Class file

Scheduled Pinned Locked Moved C#
jsondatabasesecurityhelptutorial
5 Posts 3 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.
  • B Offline
    B Offline
    Bootzilla33
    wrote on last edited by
    #1

    I need help creating a class file that randomly generates a number of 10 characters, 0-9, A-Z. By generating a PIN it will create an authorization workflow to allow the user to authenticate the app. This number will be directed to a config file instead of a URL. The user goes thru a auth process and instead of calling back a URL there will be a page to randonly generate a pin. The randomly generated PIN will be stored in a database table. For the database columns would get set properties be the best approach for each column in that table? Would this be the best approach for REST API? I am not very familiar with API's. Something like this

    public class AuthorizationPIN
    {
    public int Id { get; set; }
    public string AccessCode { get; set; }
    public string PIN { get; set; }

    }
    
    L 1 Reply Last reply
    0
    • B Bootzilla33

      I need help creating a class file that randomly generates a number of 10 characters, 0-9, A-Z. By generating a PIN it will create an authorization workflow to allow the user to authenticate the app. This number will be directed to a config file instead of a URL. The user goes thru a auth process and instead of calling back a URL there will be a page to randonly generate a pin. The randomly generated PIN will be stored in a database table. For the database columns would get set properties be the best approach for each column in that table? Would this be the best approach for REST API? I am not very familiar with API's. Something like this

      public class AuthorizationPIN
      {
      public int Id { get; set; }
      public string AccessCode { get; set; }
      public string PIN { get; set; }

      }
      
      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      You show one small component (of a larger process) and ask for "opinions". At this point, it is neither right nor wrong.

      "(I) am amazed to see myself here rather than there ... now rather than then". ― Blaise Pascal

      B 1 Reply Last reply
      0
      • L Lost User

        You show one small component (of a larger process) and ask for "opinions". At this point, it is neither right nor wrong.

        "(I) am amazed to see myself here rather than there ... now rather than then". ― Blaise Pascal

        B Offline
        B Offline
        Bootzilla33
        wrote on last edited by
        #3

        Another smarmy smartass. Wow you are you fucking dumb. I don't have any other code besides what I posted. I don't know where to begin with code to generate a PIN number that's why I asked! Fuck off asshole seriously. I don't want to hear it from the moderators. There is no excuse for responding to me the way this guy responded to me. None!

        L M 2 Replies Last reply
        0
        • B Bootzilla33

          Another smarmy smartass. Wow you are you fucking dumb. I don't have any other code besides what I posted. I don't know where to begin with code to generate a PIN number that's why I asked! Fuck off asshole seriously. I don't want to hear it from the moderators. There is no excuse for responding to me the way this guy responded to me. None!

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          LOL. [How do I generate a random int number in C#? - Stack Overflow](https://stackoverflow.com/questions/2706500/how-do-i-generate-a-random-int-number-in-c) And then you use a "substitution" cipher. (And keep your foul mouth out of my personal email box).

          "(I) am amazed to see myself here rather than there ... now rather than then". ― Blaise Pascal

          1 Reply Last reply
          0
          • B Bootzilla33

            Another smarmy smartass. Wow you are you fucking dumb. I don't have any other code besides what I posted. I don't know where to begin with code to generate a PIN number that's why I asked! Fuck off asshole seriously. I don't want to hear it from the moderators. There is no excuse for responding to me the way this guy responded to me. None!

            M Offline
            M Offline
            Mycroft Holmes
            wrote on last edited by
            #5

            And with a response like that you are hoping for support from a bunch of volunteers. If you don't like the response he gives you then ignore him as you will probably be ignored in the future.

            Never underestimate the power of human stupidity RAH

            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