1
0
mirror of https://github.com/php/doc-ru.git synced 2026-04-27 01:08:05 +02:00
Files
archived-doc-ru/reference/hash/functions/hash-copy.xml
T
2023-11-23 12:15:53 +03:00

115 lines
2.9 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 584a9fb976cccc93109776a904ec1c5ddb2d580f Maintainer: aur Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.hash-copy" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>hash_copy</refname>
<refpurpose>Копирует контекст хеширования</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>HashContext</type><methodname>hash_copy</methodname>
<methodparam><type>HashContext</type><parameter>context</parameter></methodparam>
</methodsynopsis>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>context</parameter></term>
<listitem>
<para>
Контекст хеширования, возвращённый <function>hash_init</function>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Возвращает копию контекста хеширования.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>7.2.0</entry>
<entry>
Принимает и возвращает <classname>HashContext</classname>, а не ресурс.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Пример использования <function>hash_copy</function></title>
<programlisting role="php">
<![CDATA[
<?php
$context = hash_init("sha256");
hash_update($context, "Наглый коричневый лисёнок");
/* копия контекста для дальнейшего использования */
$copy_context = hash_copy($context);
echo hash_final($context), "\n";
hash_update($copy_context, "прыгает вокруг ленивой собаки.");
echo hash_final($copy_context), "\n";
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
49fd7dddcdc0e0e6b2252f966b750d78536e8cd2677bf84db0c605652f7f1699
8b0ec9465a2a0befe6b45bc081e32e4629a7f3e39dcf1fda31af101b8d85145b
]]>
</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:"~/.phpdoc/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
-->