Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    England =)
    Posts
    518
    Thanks
    25
    Thanked 0 Times in 0 Posts

    passwords in php/mysql

    hi peeps.

    i have designed a new system for a client, based on a system we have currently here.

    the problem is that in our system (which i administrate) i can see our passwords (due to people having the memory of a sieve) so i took out the code that encrypted/hashed/whatever-its-called passwords, so they cant be viewed.

    so, how can i incorporate hiding the passwords again?

    i tried password() when putting back into mysql, but then i couldnt log in with the password any more?!?!

    help!!!!!!!! thanks!
    "They hired me for my motivational skills. Everyone at work says they have to work much harder when I`m around" Homer J Simpson

  • #2
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    You can choose from md5() or sha1().
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

  • Users who have thanked rangana for this post:

    babelfish (02-02-2009)

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    England =)
    Posts
    518
    Thanks
    25
    Thanked 0 Times in 0 Posts
    thanks mate.
    "They hired me for my motivational skills. Everyone at work says they have to work much harder when I`m around" Homer J Simpson

  • #4
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    If you have the ability to, I would use salted, hashed passwords. You could use a random individual salt for each user (new database table possibly), and concatenate the salt and password being submitted together and see if it matches the md5/sha1 sum in the database.

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    England =)
    Posts
    518
    Thanks
    25
    Thanked 0 Times in 0 Posts
    the basic one above will work fine - this isnt on the web, its just a little system to sit on a box at one of my clients. if it were web enabled i might look into more security
    "They hired me for my motivational skills. Everyone at work says they have to work much harder when I`m around" Homer J Simpson


  •  

    Posting Permissions

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