Class ChunkHash
Encapsulates the creation of a hash from streamed chunks of data
- Aws\Common\Hash\ChunkHash implements Aws\Common\Hash\ChunkHashInterface
Methods summary
-
public
__construct ( string $algorithm =
Aws\Common\Hash\ChunkHashInterface::DEFAULT_ALGORITHM
)Constructs the chunk hash and sets the algorithm to use for hashing
-
public
addData ( string $data )
Add a chunk of data to be hashed
-
public
getHash ( bool $returnBinaryForm = false )
Return the results of the hash
-
public
__clone ( )
Methods detail
#
public
Aws\Common\Hash\ChunkHash
__construct( string $algorithm = Aws\Common\Hash\ChunkHashInterface::DEFAULT_ALGORITHM
)
Constructs the chunk hash and sets the algorithm to use for hashing
Parameters
- $algorithm
string
$algorithm A valid hash algorithm name as returned byhash_algos()
Returns
Implementation of
Add a chunk of data to be hashed
Parameters
- $data
string
$data Data to be hashed
Returns
Implementation of
Return the results of the hash
Parameters
- $returnBinaryForm
boolean
$returnBinaryForm If true, returns the hash in binary form instead of hex form
Returns
string
Implementation of
Magic methods summary
Constants summary
Constants inherited from Aws\Common\Hash\ChunkHashInterface
Properties summary
protected
resource
|
$context |
#
The hash context as created by |
protected
string
|
$hash |
#
The resulting hash in hex form |
protected
string
|
$hashRaw |
#
The resulting hash in binary form |