hash_update
Description
The hash_update of Hash for PHP pump data into an active hashing context.
Syntax
hash_update( HashContext $context, string $data ): true
Parameters
context
Hashing context returned by hash_init().
data
Message to be included in the hash digest.
Return
Returns true.
Examples
1 · context data
<? $algo = "sha384"; $context = hash_init($algo); $data = "mydata"; hash_update($context, $data); $hash = hash_final($context); echo $hash;
8a40b2c5c3861f6bd1c175adffcb109c84e6e0a7d53f1cb6d698bcc9bbfcbe5d9175fa446a606c8f6e7aaf592ad6ad4c
2 · return
<? $algo = "sha384"; $context = hash_init($algo); $data = "mydata"; $return = hash_update($context, $data); hash_final($context); var_export($return);
true