Speed up development with full-stack environments for every branch.

Learn More

Finalize an incremental hash and return resulting digest [PHP]

8 Runs 46 Views 0 Copies
Saved

Saved

gtsolutions 373

gtsolutions
published 4 years ago

<?php
/*
 * PHP hash - Finalize an incremental hash and return resulting digest
 */

//Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..) 
$algo = 'sha1';
$ctx = hash_init($algo);
hash_update($ctx, 'The quick brown fox jumped over the lazy dog.');
echo hash_final($ctx);
?>
Please login/signup to get access to the terminal.

Your session has timed out.

Dismiss (the page may not function properly).