SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,159
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Post I am confuse of this two

    Hi, can i ask what is the difference of this two,and which one should i use in my registration form to encrypt password..

    sha2('$password',256)
    or

    hash('sha256',$password

    Thank you in advance.

  2. #2
    Non-Member
    Join Date
    Sep 2012
    Location
    Sweden
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use SHA-3 alternativelly, as it is much better and different as SHA-2 . Or md5 hash, as usually

  3. #3
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,159
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by euro-space View Post
    Use SHA-3 alternativelly, as it is much better and different as SHA-2 . Or md5 hash, as usually
    how do you retrieve the password using sha3 ? so that the user can log-in successfully.


  4. #4
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,680
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    jemz,

    To compare a hash value, you must read hash the submitted password then compare that to the hashed value in the database. The whole objective is to NOT store the password.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  5. #5
    Non-Member
    Join Date
    Sep 2012
    Location
    Sweden
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'd have sha-3 extension installed in php. Here's the download page with instructions: https://github.com/strawbrary/php-sha3


Bookmarks

Posting Permissions

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