• PHP Video Tutorials

PHP - Hash Functions



List of Functions

PHP − indicates the earliest version of PHP that supports the function.

Sr.No Function & Description
1

hash()

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

hash_hmac_file()

The hash_hmac_file() function is used to generate keyed hash value for the given file contents using HMAC method.

3

hash_​pbkdf2()

The hash_​pbkdf2() function returns PBKDF2 key derivation for the given password.

4

hash_algos()

The hash_algos() function returns an array of all the hashing algorithms supported.

5

hash_copy()

The hash_copy() function is used to copy the hashing context generated from hash_init().

6

hash_equals()

The hash_equals() function compares two given strings at the same time and return true if equal.

7

hash_file()

The hash_file() function will return hash of given file contents. The return value will be a string of lowercase hexits.

8

hash_final()

The hash_final() function returns the final message digest.

9

hash_hkdf()

The hash_hkdf() function returns HKDF key derivation for the given input key.

10

hash_hmac()

The hash_hmac() function is used to generate keyed hash value using HMAC method.

11

hash_hmac_algos()

The hash_hmac_algos() function returns an array of all the hashing algorithms that are suitable for hash_hmac.

12

hash_init()

The hash_init() function initializes an incremental hashcontext that can be used with other hash functions like hash_update(), hash_final() etc.

13

hash_update()

The hash_update() function will update the given data with the hash context.

14

hash_update_file()

The hash_update_file() function will update the given file content with the hash context.

15

hash_update_stream()

The hash_update_stream() function will update the hash context from an open stream.

php_function_reference.htm
Advertisements