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 / C++ / MFC
  4. User name/Password authentication

User name/Password authentication

Scheduled Pinned Locked Moved C / C++ / MFC
c++securityregexquestion
4 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.
  • T Offline
    T Offline
    TariqZ
    wrote on last edited by
    #1

    I want to implement a username/password authentication system in my MFC/VC++6 application. the idea is to have username/password pairs and previlige level of the user stored encrypted in a file and while authenticating a user get, decrypt and match the info and set previlige level. Plz have any code? Thanks in advance. sohail

    C CPalliniC 2 Replies Last reply
    0
    • T TariqZ

      I want to implement a username/password authentication system in my MFC/VC++6 application. the idea is to have username/password pairs and previlige level of the user stored encrypted in a file and while authenticating a user get, decrypt and match the info and set previlige level. Plz have any code? Thanks in advance. sohail

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      How secure does it have to be ? MD5 code is easy to find on the web, you can store MD5 hashes of usernames and passwords, and apply the hash to what the user types in ( rather than have to unencrypt the records in your text file ). This has the advantage that a hash that cannot be reversed is more secure, so long as the hacker doesn't know what the algorithm is.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      N 1 Reply Last reply
      0
      • T TariqZ

        I want to implement a username/password authentication system in my MFC/VC++6 application. the idea is to have username/password pairs and previlige level of the user stored encrypted in a file and while authenticating a user get, decrypt and match the info and set previlige level. Plz have any code? Thanks in advance. sohail

        CPalliniC Offline
        CPalliniC Offline
        CPallini
        wrote on last edited by
        #3

        You may use Crypto API, see here [^] for a code sample. :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

        In testa che avete, signor di Ceprano?

        1 Reply Last reply
        0
        • C Christian Graus

          How secure does it have to be ? MD5 code is easy to find on the web, you can store MD5 hashes of usernames and passwords, and apply the hash to what the user types in ( rather than have to unencrypt the records in your text file ). This has the advantage that a hash that cannot be reversed is more secure, so long as the hacker doesn't know what the algorithm is.

          Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

          N Offline
          N Offline
          Nelek
          wrote on last edited by
          #4

          hi, I'm completely agree. It is the encryption for CISCO Routers for admin or to connect in remote rooters and create a WAN-Path (At least two years ago when I made the CCNAs). You can not uncrypt (at least not very easy) but you can always apply the encryption to whatever the user types and compare both encrypted logins or passwords

          -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

          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