salted hashing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lisles
    New Member
    • Jan 2010
    • 40

    salted hashing

    hey,can anybody tell me how to do salted hashing in php
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Salting is simply the act of perpending/appending the input string with another string before hashing it.

    Comment

    • lisles
      New Member
      • Jan 2010
      • 40

      #3
      how do i specify the salt?is it some fixed value?

      Comment

      • Atli
        Recognized Expert Expert
        • Nov 2006
        • 5062

        #4
        The salt is just any random string. You can define it statically as a constant or a simple variable, or you can create a function to randomly generate one. It's up to you.

        Usually people either create a static salt for their entire application (relatively low-security), or generate a salt for the user based on some combination of user-specific value, such as their join date, username, date-of-birth; or even a combination thereof.

        Simply put, you generate the salt. The more complex and difficult to reproduce you make it, the harder it will be to recreate and crack.

        Comment

        Working...