mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
MFB: Upgrade to the new-reference-structure
- (Created missing setup sections in setup.xml, if any) - Moved the intro to book.xml - Changed the intro ID from <extname>.intro to intro.<extname> - Moved the constants entity to book.xml - Changed constants.xml to be an appendix - Moved mhash.examples into its own chapter (examples.xml) - Moved the requirements, configuration and resources sections to setup.xml - Moved the configure entity to setup.xml git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@248999 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
8bf8bece80
commit
f06c0e12d8
5 changed files with 180 additions and 88 deletions
60
reference/mhash/book.xml
Normal file
60
reference/mhash/book.xml
Normal file
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- Purpose: mathcrypto.crypto -->
|
||||
<!-- Membership: bundled, external -->
|
||||
|
||||
<book xml:id="book.mhash" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Mhash</title>
|
||||
|
||||
<!-- {{{ preface -->
|
||||
<preface xml:id="intro.mhash">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
These functions are intended to work with <link
|
||||
xlink:href="&url.mhash;">mhash</link>. Mhash can be used to create checksums,
|
||||
message digests, message authentication codes, and more.
|
||||
</para>
|
||||
<para>
|
||||
This is an interface to the mhash library. mhash supports a wide
|
||||
variety of hash algorithms such as MD5, SHA1, GOST, and many
|
||||
others. For a complete list of supported hashes, refer to the
|
||||
documentation of mhash. The general rule is that you can access
|
||||
the hash algorithm from PHP with MHASH_HASHNAME. For example, to
|
||||
access TIGER you use the PHP constant MHASH_TIGER.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
This extension is obsoleted by <link linkend="book.hash">Hash</link>.
|
||||
</para>
|
||||
</note>
|
||||
</preface>
|
||||
<!-- }}} -->
|
||||
|
||||
&reference.mhash.setup;
|
||||
&reference.mhash.constants;
|
||||
&reference.mhash.examples;
|
||||
&reference.mhash.reference;
|
||||
|
||||
</book>
|
||||
|
||||
<!-- 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
|
||||
-->
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<section xml:id="mhash.constants" xmlns="http://docbook.org/ns/docbook">
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<appendix xml:id="mhash.constants" xmlns="http://docbook.org/ns/docbook">
|
||||
&reftitle.constants;
|
||||
&extension.constants;
|
||||
<para>
|
||||
|
@ -90,7 +90,7 @@
|
|||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
</appendix>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
53
reference/mhash/examples.xml
Normal file
53
reference/mhash/examples.xml
Normal file
|
@ -0,0 +1,53 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
|
||||
<appendix xml:id="mhash.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Compute the MD5 digest and hmac and print it out as hex</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$input = "what do ya want for nothing?";
|
||||
$hash = mhash(MHASH_MD5, $input);
|
||||
echo "The hash is " . bin2hex($hash) . "<br />\n";
|
||||
$hash = mhash(MHASH_MD5, $input, "Jefe");
|
||||
echo "The hmac is " . bin2hex($hash) . "<br />\n";
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
This will produce:
|
||||
<screen>
|
||||
<![CDATA[
|
||||
The hash is d03cb659cbf9192dcd066272249f8412
|
||||
The hmac is 750c783e6ab0b503eaa86e310a5db738
|
||||
]]>
|
||||
</screen>
|
||||
</para>
|
||||
</example>
|
||||
</para>
|
||||
</appendix>
|
||||
|
||||
<!-- 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
|
||||
-->
|
||||
|
|
@ -1,93 +1,14 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<!-- Purpose: mathcrypto.crypto -->
|
||||
<!-- Membership: bundled, external -->
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
|
||||
<reference xml:id="ref.mhash" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Mhash Functions</title>
|
||||
<titleabbrev>mhash</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
<section xml:id="mhash.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
These functions are intended to work with <link
|
||||
xlink:href="&url.mhash;">mhash</link>. Mhash can be used to create checksums,
|
||||
message digests, message authentication codes, and more.
|
||||
</para>
|
||||
<para>
|
||||
This is an interface to the mhash library. mhash supports a wide
|
||||
variety of hash algorithms such as MD5, SHA1, GOST, and many
|
||||
others. For a complete list of supported hashes, refer to the
|
||||
documentation of mhash. The general rule is that you can access
|
||||
the hash algorithm from PHP with MHASH_HASHNAME. For example, to
|
||||
access TIGER you use the PHP constant MHASH_TIGER.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
&pecl.moved-ver;5.3.0.
|
||||
This extension is obsoleted by <link linkend="ref.hash">Hash</link>.
|
||||
</para>
|
||||
</note>
|
||||
</section>
|
||||
<reference xml:id="ref.mhash" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Mhash &Functions;</title>
|
||||
<titleabbrev>mhash</titleabbrev>
|
||||
|
||||
<section xml:id="mhash.requirements">
|
||||
&reftitle.required;
|
||||
<para>
|
||||
To use it, download the mhash distribution from <link
|
||||
xlink:href="&url.mhash;">its web site</link> and follow the included
|
||||
installation instructions.
|
||||
</para>
|
||||
</section>
|
||||
&reference.mhash.entities.functions;
|
||||
|
||||
&reference.mhash.configure;
|
||||
</reference>
|
||||
|
||||
<section xml:id="mhash.configuration">
|
||||
&reftitle.runtime;
|
||||
&no.config;
|
||||
</section>
|
||||
|
||||
<section xml:id="mhash.resources">
|
||||
&reftitle.resources;
|
||||
&no.resource;
|
||||
</section>
|
||||
|
||||
&reference.mhash.constants;
|
||||
|
||||
<section xml:id="mhash.examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Compute the MD5 digest and hmac and print it out as hex</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$input = "what do ya want for nothing?";
|
||||
$hash = mhash(MHASH_MD5, $input);
|
||||
echo "The hash is " . bin2hex($hash) . "<br />\n";
|
||||
$hash = mhash(MHASH_MD5, $input, "Jefe");
|
||||
echo "The hmac is " . bin2hex($hash) . "<br />\n";
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
This will produce:
|
||||
<screen>
|
||||
<![CDATA[
|
||||
The hash is d03cb659cbf9192dcd066272249f8412
|
||||
The hmac is 750c783e6ab0b503eaa86e310a5db738
|
||||
]]>
|
||||
</screen>
|
||||
</para>
|
||||
</example>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
</partintro>
|
||||
|
||||
&reference.mhash.entities.functions;
|
||||
|
||||
</reference>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
58
reference/mhash/setup.xml
Normal file
58
reference/mhash/setup.xml
Normal file
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
|
||||
<chapter xml:id="mhash.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.setup;
|
||||
|
||||
<!-- {{{ Requirements -->
|
||||
<section xml:id="mhash.requirements">
|
||||
&reftitle.required;
|
||||
<para>
|
||||
To use it, download the mhash distribution from <link
|
||||
xlink:href="&url.mhash;">its web site</link> and follow the included
|
||||
installation instructions.
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<!-- {{{ Installation -->
|
||||
&reference.mhash.configure;
|
||||
<!-- }}} -->
|
||||
|
||||
<!-- {{{ Configuration -->
|
||||
<section xml:id="mhash.configuration">
|
||||
&reftitle.runtime;
|
||||
&no.config;
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<!-- {{{ Resources -->
|
||||
<section xml:id="mhash.resources">
|
||||
&reftitle.resources;
|
||||
&no.resource;
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- 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
|
||||
-->
|
||||
|
Loading…
Reference in a new issue