GuzzleHttpPsr7hash

Calculate a hash of a Stream.

Description

(string) GuzzleHttp\Psr7\hash( (StreamInterface) Psr\Http\Message\StreamInterface $stream, (string) $algo, (bool) $rawOutput = false ); 

Returns (string)

Returns the hash of the stream

Parameters (3)

0. $stream (StreamInterface) => Psr\Http\Message\StreamInterface $stream
Stream to calculate the hash for
1. $algo (string)
Hash algorithm (e.g. md5, crc32, etc)
2. $rawoutput (bool)
Whether or not to use raw output

Usage

  1. if ( !function_exists( 'GuzzleHttp\Psr7\hash' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'w3-total-cache/lib/Azure/GuzzleHttp/Psr7/functions.php'; 
  3.  
  4. // Stream to calculate the hash for 
  5. $stream = Psr\Http\Message\StreamInterface $stream; 
  6.  
  7. // Hash algorithm (e.g. md5, crc32, etc) 
  8. $algo = ''; 
  9.  
  10. // Whether or not to use raw output 
  11. $rawoutput = true; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = GuzzleHttp\Psr7\hash($stream, $algo, $rawoutput); 
  15.  

Defined (1)

The function is defined in the following location(s).

/lib/Azure/GuzzleHttp/Psr7/functions.php