mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Typos fixed and documentation updated
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@307148 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
754dece7e0
commit
a2e72b2b3b
9 changed files with 108 additions and 55 deletions
|
@ -15,12 +15,12 @@
|
|||
message digests, message authentication codes, and more.
|
||||
</para>
|
||||
<para>
|
||||
This is an interface to the mhash library. mhash supports a wide
|
||||
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.
|
||||
<link linkend="mhash.constants">constants page</link>. The general rule is that you can access
|
||||
the hash algorithm from PHP with <constant>MHASH_hashname</constant>. For example, to
|
||||
access TIGER you use the PHP constant <constant>MHASH_TIGER</constant>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
|
@ -57,4 +57,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
|
|||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
<para>
|
||||
You need to compile PHP with the
|
||||
<option role="configure">--with-mhash[=DIR]</option> parameter to enable
|
||||
this extension. DIR is the mhash install directory.
|
||||
this extension. DIR is the mhash installation directory.
|
||||
</para>
|
||||
<para>
|
||||
As of PHP 5.3.0, the mhash extension is emulated thru the
|
||||
<link linkend="ref.hash">Hash</link> extension. This makes the directory
|
||||
to the mhash installation have no effect, and requires the hash extension
|
||||
to be enabled for mhash support to be available.
|
||||
<link linkend="ref.hash">Hash</link> extension. This makes
|
||||
the mhash installation directory have no effect, and requires
|
||||
the hash extension enabled to make the mhash support available.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
&extension.constants;
|
||||
<para>
|
||||
Here is a list of hashes which are currently supported by mhash. If a
|
||||
hash is not listed here, but is listed by mhash as supported, you can
|
||||
safely assume that this documentation is outdated.
|
||||
hash is not listed here, but it is listed in the mhash documentation
|
||||
as supported, you can safely assume that this documentation is outdated.
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
@ -39,41 +39,91 @@
|
|||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_HAVAL192</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_HAVAL192</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_HAVAL224</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_HAVAL256</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_MD4</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_MD2</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_MD4</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_MD5</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_RIPEMD160</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_RIPEMD128</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_RIPEMD256</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_RIPEMD320</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_SHA1</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_SHA256</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_SHA192</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_SHA224</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_SHA256</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_SHA384</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_SHA512</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_SNEFRU128</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_SNEFRU256</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_TIGER</constant>
|
||||
</simpara>
|
||||
|
@ -84,10 +134,15 @@
|
|||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_TIGER160</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_TIGER160</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<constant>MHASH_WHIRLPOOL</constant>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</appendix>
|
||||
|
@ -111,4 +166,4 @@ End:
|
|||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
-->
|
|
@ -5,7 +5,7 @@
|
|||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Compute the MD5 digest and hmac and print it out as hex</title>
|
||||
<title>Computes the MD5 digest and hmac and print it out as hex</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
@ -18,7 +18,7 @@ echo "The hmac is " . bin2hex($hash) . "<br />\n";
|
|||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
This will produce:
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
The hash is d03cb659cbf9192dcd066272249f8412
|
||||
|
@ -50,4 +50,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
|
|||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<refentry xml:id="function.mhash-count" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>mhash_count</refname>
|
||||
<refpurpose>Get the highest available hash id</refpurpose>
|
||||
<refpurpose>Gets the highest available hash ID</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
|
@ -13,15 +13,15 @@
|
|||
<void/>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Gets the highest available hash id.
|
||||
Gets the highest available hash ID.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the highest available hash id. Hashes are numbered from 0 to this
|
||||
hash id.
|
||||
Returns the highest available hash ID. Hashes are numbered from 0 to this
|
||||
hash ID.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<refentry xml:id="function.mhash-get-block-size" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>mhash_get_block_size</refname>
|
||||
<refpurpose>Get the block size of the specified hash</refpurpose>
|
||||
<refpurpose>Gets the block size of the specified hash</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
|
@ -25,7 +25,7 @@
|
|||
<term><parameter>hash</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The hash id. One of the <literal>MHASH_XXX</literal> constants.
|
||||
The hash ID. One of the <constant>MHASH_hashname</constant> constants.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<refentry xml:id="function.mhash-get-hash-name" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>mhash_get_hash_name</refname>
|
||||
<refpurpose>Get the name of the specified hash</refpurpose>
|
||||
<refpurpose>Gets the name of the specified hash</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
|
@ -25,7 +25,7 @@
|
|||
<term><parameter>hash</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The hash id. One of the <literal>MHASH_XXX</literal> constants.
|
||||
The hash ID. One of the <constant>MHASH_hashname</constant> constants.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -44,7 +44,7 @@
|
|||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>mhash_get_hash_name</function> example</title>
|
||||
<title><function>mhash_get_hash_name</function> Example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<methodparam><type>int</type><parameter>bytes</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Generates a key according to the <parameter>hash</parameter> given a user
|
||||
Generates a key according to the given <parameter>hash</parameter>, using an user
|
||||
provided <parameter>password</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
|
@ -41,8 +41,8 @@
|
|||
<term><parameter>hash</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The hash id used to create the key.
|
||||
One of the <literal>MHASH_XXX</literal> constants.
|
||||
The hash ID used to create the key.
|
||||
One of the <constant>MHASH_hashname</constant> constants.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -50,7 +50,7 @@
|
|||
<term><parameter>password</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
User supplied password.
|
||||
An user supplied password.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -59,10 +59,10 @@
|
|||
<listitem>
|
||||
<para>
|
||||
Must be different and random enough for every key you generate in
|
||||
order to create different keys. That salt must be known when you check
|
||||
the keys, thus it is a good idea to append the key to it. Salt has a
|
||||
fixed length of 8 bytes and will be padded with zeros if you supply
|
||||
less bytes.
|
||||
order to create different keys. Because <parameter>salt</parameter>
|
||||
must be known when you check the keys, it is a good idea to append
|
||||
the key to it. Salt has a fixed length of 8 bytes and will be padded
|
||||
with zeros if you supply less bytes.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<refentry xml:id="function.mhash" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>mhash</refname>
|
||||
<refpurpose>Compute hash</refpurpose>
|
||||
<refpurpose>Computes hash</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
|
@ -28,7 +28,7 @@
|
|||
<term><parameter>hash</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The hash id. One of the <literal>MHASH_XXX</literal> constants.
|
||||
The hash ID. One of the <constant>MHASH_hashname</constant> constants.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -59,7 +59,7 @@
|
|||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the resulting hash (also called digest) or HMAC as a string, or
|
||||
&false; on errors.
|
||||
&false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
Loading…
Reference in a new issue