CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2008
    Posts
    27

    question about passwords

    is it possible for when the use enters a password that it can be encrypted and saved in an external file. and it is encrypted with a some sort of user generated recovery question? any feedback on the topic would be much appreciated.

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: question about passwords

    It's possible, but that's not how I'd do it. Typically passwords should not be stored; rather, a 1-way hash of the password should be stored. Then you can just hash any passwords entered later and compare the hashes.

  3. #3
    Join Date
    Apr 2007
    Location
    Mars NASA Station
    Posts
    1,436

    Re: question about passwords

    Good point.
    Thanks for your help.

  4. #4
    Join Date
    Dec 2008
    Posts
    27

    Re: question about passwords

    how do i do a 1-way hash?

  5. #5
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: question about passwords

    Quote Originally Posted by twistedmike
    how do i do a 1-way hash?
    You can use one from a cryptographic library, or implement a published one yourself (do not invent your own). You should also include a salt along with each password to frustrate dictionary attacks.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured