Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

hash_update

Description

The hash_update of Hash for PHP pump data into an active hashing context.

Syntax

hash_update(HashContext $context, string $data): bool

Parameters

context

Hashing context returned by hash_init().

data

Message to be included in the hash digest.

Return

Returns true.

Examples

1 · context data

<?

$context = hash_init('sha384');
$data = 'Hello';

hash_update($context, $data);

echo hash_final($context);

?>
3519fe5ad2c596efe3e276a6f351b8fc0b03db861782490d45f7598ebd0ab5fd5520ed102f38c4a5ec834e98668035fc

2 · Return

<?

$context = hash_init('sha384');
$data = 'Hello';

$return = hash_update($context, $data);

hash_final($context);

var_export($return);

?>
true
HomeMenu