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

Vb Password?

Options
  • 17-01-2003 5:13pm
    #1
    Registered Users Posts: 446 ✭✭


    What would be the best way to put a password protect page, and a change password page into VB?

    Would I use a database or just If loops?

    Danke
    Kate:D


Comments

  • Closed Accounts Posts: 9,314 ✭✭✭Talliesin


    Where to store the password hashes depends on what it is you are securing. If you are securing a db-backed resource then putting the hashes in in the db, and that is a common scenario. However it isn't unheard of for other places to be more appropriate, or for there to be cases where you just pass the password to something else and don't actually "look" at it yourself.

    The big problem with passwords in VB is how to hash it. You don't want to store the passwords anywhere so you will want to have to use some sort of hash (SHA-1 for example). While writing SHA-1 in VB is by no means impossible (I've even seen it done in VBScript) it really is the sort of thing that is easier to do in C or C++.

    If you have any C or C++ I'd recommend you use that to write a DLL to handle the hashing. There is some SHA-1 code in C here.

    One thing I like to do myself is to do the SHA-1 as an extended stored procedure on SQL Server, that way I don't have to think about the hashing at all at the VB level.

    If you don't have any C or C++ then don't despair. There is VB hashing code out there that is good, if slow and confusing.


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Originally posted by kegan5
    What would be the best way to put a password protect page, and a change password page into VB?
    Are you talking about VB or ASP-VBS?

    If you mean the latter this tutorial will help.


Advertisement