首页 >函数列表 >hash_copy

hash_copy

hash_copy

(PHP 5 >= 5.3.0)

hash_copyCopy hashing context

说明

resource hash_copy ( resource $context )

参数

context

Hashing context returned by hash_init().

返回值

Returns a copy of Hashing Context resource.

范例

Example #1 hash_copy() example

<?php
$context 
hash_init("md5");
hash_update($context"data");


$copy_context hash_copy($context);

echo 
hash_final($context), " ";

hash_update($copy_context"data");
echo 
hash_final($copy_context), " ";
?>

以上例程会输出:

8d777f385d3dfec8815d20f7496026dc
511ae0b1c13f95e5f08f1a0dd3da3d93


  • hash
  • hash_algos
  • hash_copy
  • hash_file
  • hash_final
  • hash_hmac
  • hash_hmac_file
  • hash_init
  • hash_update
  • hash_update_file
  • hash_update_stream
  • PHP MySQL HTML CSS JavaScript MSSQL AJAX .NET JSP Linux Mac ASP 服务器 SQL jQuery C# C++ java Android IOS oracle MongoDB SQLite wamp 交通频道