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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Sep 2009
    Location
    Calgary, Alberta
    Posts
    239
    Thanks
    47
    Thanked 3 Times in 3 Posts

    Show actual password with Sha1

    Hey all.

    I was wondering how to show a password in it's true text in a textbox using Sha1 encryption and also how to resave it after to the database in Sha1.??

    Thanks

    Slayer.

  • #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,026
    Thanks
    2
    Thanked 315 Times in 307 Posts
    sha1 (and md5) are one way hashes/checksums. They are not encryption, so it is not possible to decrypt them.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #3
    Regular Coder
    Join Date
    Sep 2009
    Location
    Calgary, Alberta
    Posts
    239
    Thanks
    47
    Thanked 3 Times in 3 Posts
    Thanks for that info...

    is there an easy was to change the current password with a script.??

    the issue is I have created a login script using MD5 now instead of SHa1 and would like the ability to change the password instead of seeing the current as you say that it is not able to do so.??

    any help with the script would be greatfull.

    Thanks,


    Slayer.

  • #4
    Regular Coder
    Join Date
    Jul 2009
    Location
    Chicago, IL
    Posts
    169
    Thanks
    26
    Thanked 3 Times in 3 Posts
    What I might recommend doing is when a user types in a password and you md5 hash it and check it against the stored database value. If the two are equal then sha1 the typed in password and store that in the database. Just a thought.


  •  

    Posting Permissions

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