Results 1 to 11 of 11

Thread: Saving Username and Password

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2004
    Posts
    13

    Saving Username and Password

    I'm looking for a way to save a users username and password. I know I could save it in the settings INI file that I'm using, but that seems just too unsecure for my taste.... Any advance would be welcomed.

  2. #2
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: Saving Username and Password

    Encrypt the info... you'll need to build a separate facility for managing the encrypted file.

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2004
    Posts
    13

    Re: Saving Username and Password

    Quote Originally Posted by leinad31
    Encrypt the info... you'll need to build a separate facility for managing the encrypted file.
    Can you suggest some encryption algorithms?

  4. #4
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Saving Username and Password

    Saving anywhere is "unsecure". The only question is how hard to make it seem secure. Encryption, hiding it inside an image saved to disk, writing it to an obscure key in the registry, on a secure server, in a password protected database, and several other options are available. Judge the level of security with what you are using the passwords for: a game, use simple options. For credit card info & other valuable info, use the best you can come up with.

    The downside of keeping it on disk is that it can get deleted, corrupted, moved or lost. You should have a backup plan for that
    Last edited by LaVolpe; Nov 28th, 2007 at 09:33 PM.

  5. #5
    Lively Member
    Join Date
    Aug 2007
    Posts
    65

    Re: Saving Username and Password

    Here is some code to save it to registry. Replace the App-name-here with the name of the app.

    Heres code to save itNote, the variable Username is the username, and Password is the password.
    Code:
    Savesetting("App-name-here","Saved Data","Username",Username)
    Savesetting("App-name-here","Saved Data","Password",Password)
    Now, here is to retrieve it.
    Code:
    Username = GetSetting("App-name-here","Saved Data","Username")
    Password = GetSetting("App-name-here","Saved Data","Password")
    Hope it helps.

  6. #6

    Thread Starter
    New Member
    Join Date
    Sep 2004
    Posts
    13

    Re: Saving Username and Password

    Ok, well I think I'll save it to the register with Rc4 or something. One question though, when I save it to register does it "Get" the same values on different users under XP and Vista?

  7. #7
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: Saving Username and Password

    Quote Originally Posted by Dustcrazy
    ...One question though, when I save it to register does it "Get" the same values on different users under XP and Vista?
    When a user logs in to windows, they can only access their own settings using SaveSetting.

  8. #8
    Member
    Join Date
    Jun 2003
    Posts
    44

    Re: Saving Username and Password

    Engypt username and password by MD5

    Save the file into Windows Folder
    I love VB6

    < advertising links removed by moderator >

  9. #9
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Saving Username and Password

    There are some encryption examlples in our CodeBank that you might want to check out.

  10. #10
    Fanatic Member
    Join Date
    Nov 2007
    Posts
    520

    Re: Saving Username and Password

    Quote Originally Posted by The Rogue
    Here is some code to save it to registry. Replace the App-name-here with the name of the app.

    Heres code to save itNote, the variable Username is the username, and Password is the password.
    Code:
    Savesetting("App-name-here","Saved Data","Username",Username)
    Savesetting("App-name-here","Saved Data","Password",Password)
    Now, here is to retrieve it.
    Code:
    Username = GetSetting("App-name-here","Saved Data","Username")
    Password = GetSetting("App-name-here","Saved Data","Password")
    Hope it helps.

    when i try those, i get an error of: Syntax Error | Im using VB6 SP6

  11. #11
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Saving Username and Password

    What line generates the error?

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