Professional Documents
Culture Documents
SH A 2
SH A 2
php
/*this returns sha512 128string
sha256 64
*/
function sha2($string){
$fp = tmpfile();
fwrite($fp, $string);
rewind($fp);
$ctx = hash_init('sha512');
hash_update_stream($ctx, $fp);
return hash_final($ctx);
}
?>