Function __global->hash
Definitions
sources_custom/phpstub.php
- Generate a non-keyed hash value of the given data.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $algo | string | No | No | required parameter | N/A | N/A | The name of the hashing algorithm to use |
| $data | string | No | No | required parameter | N/A | N/A | The data to be hashed |
| $binary | boolean | No | No | False | N/A | N/A | Whether to output raw binary data (false: output lowercase hex) |
| $options | array | No | No | [] | N/A | N/A | Additional algorithm-specific options |
Returns
- The hash value
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Generate a non-keyed hash value of the given data.
*
* @param string $algo The name of the hashing algorithm to use
* @param string $data The data to be hashed
* @param boolean $binary Whether to output raw binary data (false: output lowercase hex)
* @param array $options Additional algorithm-specific options
* @return string The hash value
*/
function hash(string $algo, string $data, bool $binary = false, array $options = []) : string
* Generate a non-keyed hash value of the given data.
*
* @param string $algo The name of the hashing algorithm to use
* @param string $data The data to be hashed
* @param boolean $binary Whether to output raw binary data (false: output lowercase hex)
* @param array $options Additional algorithm-specific options
* @return string The hash value
*/
function hash(string $algo, string $data, bool $binary = false, array $options = []) : string

