Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Storing passwords locally.

  • 16-11-2009 10:37am
    #1
    Registered Users, Registered Users 2 Posts: 2,236 ✭✭✭


    Hi,

    I'm currently working on a desktop client in VB.NET that interfaces with a http web service that accepts passwords in plaintext.

    My app will store user accounts to this service including passwords. Just wondering what's the best way to store passwords locally?

    I know this probably shouldn't be done at all, and if it is they should be hashed.

    So what are the options? I was thinking along the lines of an XML file or else the registry.

    Say I don't want to store the password in plaintext. What are my options?


Comments

  • Moderators, Politics Moderators Posts: 41,235 Mod ✭✭✭✭Seth Brundle


    Can you not just use their windows identity?


  • Registered Users, Registered Users 2 Posts: 2,236 ✭✭✭techguy


    No, I doubt it..

    To do that wouldn't the username and password fot the web service have to be the same ??


  • Moderators, Politics Moderators Posts: 41,235 Mod ✭✭✭✭Seth Brundle


    Sorry I understand it now.
    I would probably store is in the registry if only to restrict it from other users. I would also hash it!


  • Registered Users, Registered Users 2 Posts: 2,236 ✭✭✭techguy


    About hashing.. I was thinking of the same thing. It will need to be a reversible hash.

    I wonder can hash the password using some kind of unique system variable. Then I can reverse the hash by supplying the system variable.

    Do I have access to any system/windows install specific information that can be used to reverse the password that would tie the hash to that specific PC?


  • Registered Users, Registered Users 2 Posts: 2,931 ✭✭✭Ginger


    You can use the ProtectSection method in your config file

    You can find more info on this http://msdn.microsoft.com/en-us/library/system.configuration.sectioninformation.protectsection.aspx

    The handy thing is when you encrypt your file sections like this you dont need to decrypt the file on the fly as the read function does it automagically.

    Because it uses the machine key of the machine to encrypt you need to encrypt on the machine before use.

    I did a post on this for the ASP.NET web.config here

    You can check the encryption of the section when you start the application and use the ProtectSection method


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,236 ✭✭✭techguy


    Ginger wrote: »
    You can use the ProtectSection method in your config file

    You can find more info on this http://msdn.microsoft.com/en-us/library/system.configuration.sectioninformation.protectsection.aspx

    The handy thing is when you encrypt your file sections like this you dont need to decrypt the file on the fly as the read function does it automagically.

    Because it uses the machine key of the machine to encrypt you need to encrypt on the machine before use.

    I did a post on this for the ASP.NET web.config here

    You can check the encryption of the section when you start the application and use the ProtectSection method

    Thats looks exactly like what I need. I'll have a look later on.. Thanks for that..


Advertisement