PHP - Hash Functions
List of Functions
PHP − indicates the earliest version of PHP that supports the function.
| Sr.No | Function & Description |
|---|---|
| 1 |
The hash() function returns a hash value for the given data based on the algorithm like (md5, sha256). The return value is a string with hexits (hexadecimal values). |
| 2 |
The hash_hmac_file() function is used to generate keyed hash value for the given file contents using HMAC method. |
| 3 |
The hash_pbkdf2() function returns PBKDF2 key derivation for the given password. |
| 4 |
The hash_algos() function returns an array of all the hashing algorithms supported. |
| 5 |
The hash_copy() function is used to copy the hashing context generated from hash_init(). |
| 6 |
The hash_equals() function compares two given strings at the same time and return true if equal. |
| 7 |
The hash_file() function will return hash of given file contents. The return value will be a string of lowercase hexits. |
| 8 |
The hash_final() function returns the final message digest. |
| 9 |
The hash_hkdf() function returns HKDF key derivation for the given input key. |
| 10 |
The hash_hmac() function is used to generate keyed hash value using HMAC method. |
| 11 |
The hash_hmac_algos() function returns an array of all the hashing algorithms that are suitable for hash_hmac. |
| 12 |
The hash_init() function initializes an incremental hashcontext that can be used with other hash functions like hash_update(), hash_final() etc. |
| 13 |
The hash_update() function will update the given data with the hash context. |
| 14 |
The hash_update_file() function will update the given file content with the hash context. |
| 15 |
The hash_update_stream() function will update the hash context from an open stream. |