This section explains the reasons behind using hashing functions to secure passwords, as well as how to do so effectively.
Password hashing is one of the most basic security considerations that must be made when designing any application that accepts passwords from users. Without hashing, any passwords that are stored in your application's database can be stolen if the database is compromised, and then immediately used to compromise not only your application, but also the accounts of your users on other services, if they do not use unique passwords.
By applying a hashing algorithm to your user's passwords before storing them in your database, you make it implausible for any attacker to determine the original password, while still being able to compare the resulting hash to the original password in the future.
It is important to note, however, that hashing passwords only protects them from being compromised in your data store, but does not necessarily protect them from being intercepted by malicious code injected into your application itself.
Hashing algorithms such as MD5, SHA1 and SHA256 are designed to be very fast and efficient. With modern techniques and computer equipment, it has become trivial to "brute force" the output of these algorithms, in order to determine the original input.
Because of how quickly a modern computer can "reverse" these hashing algorithms, many security professionals strongly suggest against their use for password hashing.
When hashing passwords, the two most important considerations are the computational expense, and the salt. The more computationally expensive the hashing algorithm, the longer it will take to brute force its output.
PHP 5.5 provides a native password hashing API that safely handles both hashing and verifying passwords in a secure manner. There is also » a pure PHP compatibility library available for PHP 5.3.7 and later.
Another option is the crypt() function, which supports several hashing algorithms in PHP 5.3 and later. When using this function, you are guaranteed that the algorithm you select is available, as PHP contains native implementations of each supported algorithm, in case one or more are not supported by your system.
The suggested algorithm to use when hashing passwords is Blowfish, which is also the default used by the password hashing API, as it is significantly more computationally expensive than MD5 or SHA1, while still being scalable.
Note that if you are using crypt() to verify a password, you will need to take care to prevent timing attacks by using a constant time string comparison. Neither PHP's == and === operators nor strcmp() perform constant time string comparisons. As password_verify() will do this for you, you are strongly encouraged to use the native password hashing API whenever possible.
A cryptographic salt is data which is applied during the hashing process in order to eliminate the possibility of the output being looked up in a list of pre-calculated pairs of hashes and their input, known as a rainbow table.
In more simple terms, a salt is a bit of additional data which makes your hashes significantly more difficult to crack. There are a number of services online which provide extensive lists of pre-computed hashes, as well as the original input for those hashes. The use of a salt makes it implausible or impossible to find the resulting hash in one of these lists.
password_hash() will create a random salt if one isn't provided, and this is generally the easiest and most secure approach.
When using password_hash() or crypt(), the return value includes the salt as part of the generated hash. This value should be stored verbatim in your database, as it includes information about the hash function that was used and can then be given directly to password_verify() or crypt() when verifying passwords.
The following diagram shows the format of a return value from crypt() or password_hash(). As you can see, they are self-contained, with all the information on the algorithm and salt required for future password verification.
 2014 © 2018 | auto.pazos.cz auto.xbazar.eu deti.pazos.cz deti.xbazar.eu dum.PAZOS.cz dum.xbazar.eu elektro.PAZOS.cz elektro.xbazar.eu emailing.SERVERS.cz FAKTURA.ovh foto.PAZOS.cz foto.servers.cz foto.xbazar.eu fotoalbum.servers.cz free.FaNet.cz hudba.PAZOS.cz hudba.xbazar.eu knihy.PAZOS.cz knihy.xbazar.eu mobily.PAZOS.cz mobily.xbazar.eu moto.PAZOS.cz moto.xbazar.eu myPHP.cz/br/ myPHP.cz/ch/ myPHP.cz/de/ myPHP.cz/es/ myPHP.cz/fr/ myPHP.cz/it/ myPHP.cz/jp/ myPHP.cz/ro/ myPHP.cz/ru/ myPHP.pl nabytek.PAZOS.cz nabytek.xbazar.eu obleceni.PAZOS.cz obleceni.xbazar.eu ostatni.PAZOS.cz ostatni.xbazar.eu OUTLOK.cz/groupoffice/ pc.PAZOS.cz pc.xbazar.eu pohlednice.servers.cz pohledy.servers.cz postcards.servers.cz prace.PAZOS.cz prace.xbazar.eu QRCOLOR.eu QRGenerator.ovh reality.PAZOS.cz reality.xbazar.eu RIOMEDIA.eu RLT.ovh RYCHLOSTI.eu sluzby.PAZOS.cz sluzby.xbazar.eu sport.PAZOS.cz sport.xbazar.eu stroje.PAZOS.cz stroje.xbazar.eu telefonni.OPERATOR.ovh virtualni.OPERATOR.ovh vstupenky.PAZOS.cz vstupenky.xbazar.eu www.FAKTURA.ovh www.FakturaceNet.cz www.FaNET.cz www.KUCHTIK.cz www.KUNOR.cz www.myPHP.cz www.myPHP.cz/br/ www.myPHP.cz/ch/ www.myPHP.cz/de/ www.myPHP.cz/es/ www.myPHP.cz/fr/ www.myPHP.cz/it/ www.myPHP.cz/jp/ www.myPHP.cz/ro/ www.myPHP.cz/ru/ www.myPHP.cz/tr/ www.myPHP.pl www.OUTLOK.cz www.OUTLOK.cz/groupoffice/ www.PAZOS.cz www.PLNO.cz www.QRCOD.cz www.QRCOD.eu www.QRCOD.us www.QRLogo.cz www.QRLogo.eu www.QRLogo.info www.RIOMEDIA.eu www.RLT.ovh www.SERVERS.cz www.vzory-smluv.eu www.xASP.cz www.xBAZAR.eu www.XBAZAR.pl www.XBAZAR.us www.xFON.cz