php - Using Encryption (Hash Algorithm) On Variables -
Currently, I am encrypting data in a database that uses the code found on the web and the introduction of the subject in the form of. My question arises from here, two Wiki Hoo articles (and is special for these articles): one on encryption; On the other, both articles appear quite good; However, there is a significant difference between the two: the JavaScript definition of hashing algorithms used in the former states ( $ password = hash ('sha512', $ password. $ Salt)
is required for PHP itself To work.
Php By reading the PHP documentation, my impression was that hash ()
With the addition of the method (found in both articles), the authors of the first states, which are the
was able to handle a series of pre-defined hashing algorithms recognized by an identifier, such as hash (sha512)
encrypts the external form (Writer suggests Javascript). whirpool
, sha512
, etc. These PHP identifiers can be caught by hash_algos ()
(or you can just read the document).
I have no need to use javascript to hash a string is.
Personally, I want to use BIPT from ink 512, but that's OK, it's not really a weak algorithm.
$ password = hash ('sha512', $ password) $ salt)
This is a good way to haveh your password, and if If you feel like full throttle, you can see PBKDF2
Comments
Post a Comment