add hash_copy() description

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@258099 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Antony Dovgal 2008-04-22 09:53:08 +00:00
parent 4bc2c67738
commit 90eba9bbd0

View file

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry xml:id="function.hash-copy" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>hash_copy</refname>
<refpurpose>Copy hashing context</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>resource</type><methodname>hash_copy</methodname>
<methodparam><type>resource</type><parameter>context</parameter></methodparam>
</methodsynopsis>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>context</parameter></term>
<listitem>
<para>
Hashing context returned by <function>hash_init</function>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns a copy of Hashing Context resource.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>hash_copy</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$context = hash_init("md5");
hash_update($context, "data");
/* copy context to be able to continue using it */
$copy_context = hash_copy($context);
echo hash_final($context), "\n";
hash_update($copy_context, "data");
echo hash_final($copy_context), "\n";
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
8d777f385d3dfec8815d20f7496026dc
511ae0b1c13f95e5f08f1a0dd3da3d93
]]>
</screen>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->