Initialize an incremental hashing context in PHP

Description

The following code shows how to initialize an incremental hashing context.

Example


<?php//from   w ww. j  a  v  a2s.c  om
$ctx = hash_init('md5');
hash_update($ctx, 'The quick brown fox ');
hash_update($ctx, 'jumped over the lazy dog.');
echo hash_final($ctx);
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Development »




Environment
Error
Hash
Include
Locale
Math
Network
Output
Reflection
PHP Regular Expressions