note 116389 deleted from function.hash by salathe
| From: | salathe@php.net | Date: | Fri, 02 Jan 2015 11:25:05 +0000 |
| Subject: | note 116389 deleted from function.hash by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-201311@lists.php.net to get a copy of this message | ||
Note Submitter: imran dot eycon at gmail dot com
----
SH2 encryption is more secure encryption yet as md5 and SH1 are attacked , according to wiki pedia
SHA-2 is a set of cryptographic hash functions designed by the NSA (U.S. National Security Agency).
SHA stands for Secure Hash Algorithm. Cryptographic hash functions are mathematical operations run
on digital data; by comparing the computed "hash" (the execution of the algorithm) to a
known and expected hash value, a person can determine the data's integrity. For example,
computing the hash of a downloaded file and comparing the result to a previously published hash
result can show whether the download has been modified or tampered with. A key aspect of
cryptographic hash functions is their one-way nature: given a computed hash value, it is very
difficult to derive the original data.
In php it is used as
$hash = hash('sha256', $pass); - creates 256 bit hash.
$hash = hash('sha512', $pass); - creates 512 bit hash. etc