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.
Printable View
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.
Encrypt the info... you'll need to build a separate facility for managing the encrypted file.
Can you suggest some encryption algorithms?Quote:
Originally Posted by leinad31
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
Here is some code to save it to registry. Replace the App-name-here with the name of the app.
Heres code to save it:(Note, the variable Username is the username, and Password is the password.
Now, here is to retrieve it.Code:Savesetting("App-name-here","Saved Data","Username",Username)
Savesetting("App-name-here","Saved Data","Password",Password)
Hope it helps.Code:Username = GetSetting("App-name-here","Saved Data","Username")
Password = GetSetting("App-name-here","Saved Data","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?
When a user logs in to windows, they can only access their own settings using SaveSetting.Quote:
Originally Posted by Dustcrazy
Engypt username and password by MD5
Save the file into Windows Folder
There are some encryption examlples in our CodeBank that you might want to check out.
Quote:
Originally Posted by The Rogue
when i try those, i get an error of: Syntax Error | Im using VB6 SP6
What line generates the error?