Class PhpHash
- Aws\PhpHash implements Aws\HashInterface
- Namespace: Aws
- Located at PhpHash.php
Incremental hashing using PHP's hash functions.
Methods Summary
- __construct ( string $algo, array $options = [] )
-
update ( string $data )
Adds data to the hash.
-
complete ( )
Finalizes the incremental hash and returns the resulting digest.
-
reset ( )
Removes all data from the hash, effectively starting a new hash.
Methods Details
__construct ( string $algo, array $options = [] )
Parameters
string | $algo | Hashing algorithm. One of PHP's hash_algos() return values (e.g. md5, sha1, etc...). |
array | $options = [] | Associative array of hashing options: - key: Secret key used with the hashing algorithm. - base64: Set to true to base64 encode the value when complete. |
update ( string $data )
Adds data to the hash.
Parameters
string | $data | Data to add to the hash |
Implementation of
string complete ( )
Finalizes the incremental hash and returns the resulting digest.
Returns
string |
Implementation of
reset ( )
Removes all data from the hash, effectively starting a new hash.