Fixing some typos...

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@38212 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Gabor Hojtsy 2000-12-23 16:15:16 +00:00
parent 200df69195
commit 331152a677
3 changed files with 109 additions and 95 deletions

View file

@ -1,54 +1,61 @@
<reference id="ref.mhash">
<title>Mhash Functions</title>
<title>Mhash függvények</title>
<titleabbrev>mhash</titleabbrev>
<partintro>
<para>
These functions are intended to work with <ulink
url="&url.mhash;">mhash</ulink>.</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.
Ezek a függvények az <ulink url="&url.mhash;">mhash</ulink>-el
működnek együtt.
</para>
<para>
To use it, download the mhash distribution from <ulink
url="&url.mhash;">its web site</ulink> and follow the included
installation instructions. You need to compile PHP with the
<option role="configure">--with-mhash</option> parameter to enable
this extension.
Ezek egy felületet biztosítanak az mhash könyvtárhoz. Az mhash
széles skáláját támogatja a hash algoritmusoknak, mint például
az MD5, SHA1, GOST és számos más.
</para>
<para>
Mhash can be used to create checksums, message digests, message
authentication codes, and more.
Ahhoz, hogy használhasd ezeket, le kell töltened az mhash
csomagot az <ulink url="&url.mhash;">mhash webhelyről</ulink>
és követned kell a telepítési utasításokat, amiket a csomagban
találsz. A PHP-t a <option role="configure">--with-mhash</option>
paraméterrel kell fordítanod, hogy engedélyezd ezt a kiterjesztést.
</para>
<para>
Az mhash például ellenőrzőösszegek, kivonatok, azonosítási kódok
előállítására is használható.
</para>
<para>
<example>
<title>Compute the MD5 digest and hmac and print it out as hex</title>
<title>Az MD5 kivonat és a hmac előállítása és kiírása hexa formában</title>
<programlisting role="php">
&lt;?php
<![CDATA[
<?php
$input = "what do ya want for nothing?";
$hash = mhash (MHASH_MD5, $input);
print "The hash is ".bin2hex ($hash)."\n&lt;br>";
$hash = mhash (MHASH_MD5, $input, "Jefe");
print "The hmac is ".bin2hex ($hash)."\n&lt;br>";
?&gt;
?>
]]>
</programlisting>
</example>
This will produce:
Ez a következő kimenetet eredményezi:
<programlisting>
<![CDATA[
The hash is d03cb659cbf9192dcd066272249f8412
The hmac is 750c783e6ab0b503eaa86e310a5db738
]]>
</programlisting>
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.
A támogatott hash-ek teljes listájához nézd meg az
mhash dokumentációt. Az általános szabály, hogy a hash
algoritmust az MHASH_HASHNEVE formában tudod elérni
PHP-ből. Például a TIGER eléréséhez az MHASH_TIGER
PHP konstans használható.
</para>
<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.
Itt következnek az mhash által jelenleg támogatott hash-ek.
Ha találsz az mhash dokumentációban itt nem listázott elemet,
nyugodtan feltételezheted, hogy az használható, és ez a dokumentáció
nem aktuális.
<itemizedlist>
<listitem>
<simpara>
@ -112,10 +119,10 @@ The hmac is 750c783e6ab0b503eaa86e310a5db738
<refentry id="function.mhash-get-hash-name">
<refnamediv>
<refname>mhash_get_hash_name</refname>
<refpurpose>Get the name of the specified hash</refpurpose>
<refpurpose>A megadott hash nevét adja vissza</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<title>Leírás</title>
<funcsynopsis>
<funcprototype>
<funcdef>string <function>mhash_get_hash_name</function></funcdef>
@ -123,26 +130,27 @@ The hmac is 750c783e6ab0b503eaa86e310a5db738
</funcprototype>
</funcsynopsis>
<para>
<function>Mhash_get_hash_name</function> is used to get the name
of the specified hash.
Az <function>mhash_get_hash_name</function> a megadott hash nevével
tér vissza.
</para>
<para>
<function>mhash_get_hash_name</function> takes the hash id as an
argument and returns the name of the hash or false, if the hash
does not exist.
Ha az <function>mhash_get_hash_name</function> függvénynek átadott
hash azonosító egy nemlétező hash-re hivatkozik, FALSE értékkel tér vissza.
</para>
<para>
<example>
<title><function>Mhash_get_hash_name</function> Example</title>
<title><function>mhash_get_hash_name</function> példa</title>
<programlisting>
&lt;?php
<![CDATA[
<?php
$hash = MHASH_MD5;
print mhash_get_hash_name ($hash);
?&gt;
?>
]]>
</programlisting>
</example>
The above example will print out:
Ez a következő kimenetet eredményezi:
<programlisting>
MD5
</programlisting>
@ -153,10 +161,10 @@ MD5
<refentry id="function.mhash-get-block-size">
<refnamediv>
<refname>mhash_get_block_size</refname>
<refpurpose>Get the block size of the specified hash</refpurpose>
<refpurpose>A megadott hash blokkméretével tér vissza</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<title>Leírás</title>
<funcsynopsis>
<funcprototype>
<funcdef>int <function>mhash_get_block_size</function></funcdef>
@ -164,13 +172,14 @@ MD5
</funcprototype>
</funcsynopsis>
<para>
<function>Mhash_get_block_size</function> is used to get the size
of a block of the specified <parameter>hash</parameter>.
Az <function>mhash_get_block_size</function> a megadott
<parameter>hash</parameter> blokkméretét adja vissza
byte-okban mérve.
</para>
<para>
<function>Mhash_get_block_size</function> takes one argument, the
<parameter>hash</parameter> and returns the size in bytes or
false, if the <parameter>hash</parameter> does not exist.
Ha az <function>mhash_get_block_size</function>
függvénynek érvénytelen <parameter>hash</parameter>
paramétert adsz, FALSE értékkel tér vissza.
</para>
</refsect1>
</refentry>
@ -178,10 +187,10 @@ MD5
<refentry id="function.mhash-count">
<refnamediv>
<refname>mhash_count</refname>
<refpurpose>Get the highest available hash id</refpurpose>
<refpurpose>Visszaadja a legnagyobb elérhető hash azonosítót</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<title>Leírás</title>
<funcsynopsis>
<funcprototype>
<funcdef>int <function>mhash_count</function></funcdef>
@ -189,14 +198,16 @@ MD5
</funcprototype>
</funcsynopsis>
<para>
<function>Mhash_count</function> returns the highest available hash
id. Hashes are numbered from 0 to this hash id.
Az <function>mhash_count</function> visszaadja a legnagyobb elérhető
hash azonosítót. A hash-ek nullától eddig a számig kapnak
azonosító számokat.
</para>
<para>
<example>
<title>Traversing all hashes</title>
<title>Az összes hash használata</title>
<programlisting role="php">
&lt;?php
<![CDATA[
<?php
$nr = mhash_count();
@ -205,7 +216,7 @@ for ($i = 0; $i &lt;= $nr; $i++) {
mhash_get_hash_name ($i),
mhash_get_block_size ($i));
}
?&gt;
?>
</programlisting>
</example>
</para>
@ -215,10 +226,10 @@ for ($i = 0; $i &lt;= $nr; $i++) {
<refentry id="function.mhash">
<refnamediv>
<refname>mhash</refname>
<refpurpose>Compute hash</refpurpose>
<refpurpose>Hash számítás</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<title>Leírás</title>
<funcsynopsis>
<funcprototype>
<funcdef>string <function>mhash</function></funcdef>
@ -228,13 +239,14 @@ for ($i = 0; $i &lt;= $nr; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Mhash</function> applies a hash function specified by
<parameter>hash</parameter> to the <parameter>data</parameter> and
returns the resulting hash (also called digest). If the <parameter> key</parameter>
is specified it will return the resulting HMAC. HMAC is keyed hashing
for message authentication, or simply a message digest that depends on
the specified key. Not all algorithms supported in mhash can be used in
HMAC mode. In case of an error returns false.
Az <function>mhash</function> alkalmazza a <parameter>hash</parameter>
által megadott algoritmust a <parameter>data</parameter> paraméterre, és
visszatér az eredmény hash-el (amit kivonatkank [digest-nek] is hívnak).
Ha a <parameter>key</parameter> paramétert is megadod, visszaadja
az keletkező HMAC-ot. A HMAC egy kulcsos hash-elés üzenet azonosításra,
vagy csak egyszerűen egy üzenet kivonat ami egy megadott kulcstól
függ. Nem minden mhash algoritmus használható HMAC módban.
Hiba esetén a függvény FALSE értéket ad.
</para>
</refsect1>
</refentry>
@ -242,10 +254,10 @@ for ($i = 0; $i &lt;= $nr; $i++) {
<refentry id="function.mhash-keygen-s2k">
<refnamediv>
<refname>mhash_keygen_s2k</refname>
<refpurpose>Generates a key</refpurpose>
<refpurpose>Kulcsot generál</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<title>Leírás</title>
<funcsynopsis>
<funcprototype>
<funcdef>string <function>mhash_keygen_s2k</function></funcdef>
@ -256,22 +268,24 @@ for ($i = 0; $i &lt;= $nr; $i++) {
</funcprototype>
</funcsynopsis>
<para>
<function>Mhash_keygen_s2k</function> generates a key that is
<parameter>bytes</parameter> long, from a user given password.
This is the Salted S2K algorithm as specified in the OpenPGP
document (RFC 2440). That algorithm will use the specified
<parameter>hash</parameter> algorithm to create the key.
The <parameter>salt</parameter> 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.
Keep in mind that user supplied passwords are not really suitable
to be used as keys in cryptographic algorithms, since users normally
choose keys they can write on keyboard. These passwords use
only 6 to 7 bits per character (or less). It is highly recommended
to use some kind of tranformation (like this function) to the user
supplied key.
Az <function>mhash_keygen_s2k</function> egy olyan kulcsot generál,
ami <parameter>bytes</parameter> hosszú, és a megadott jelszót
figyelembe véve készül. Az S2K algoritmust használja, ami az OpenPGP
dokumentumban (RFC 2440) definiált. A megadott
<parameter>hash</parameter> algortmust használja a kulcs előállítására.
A <parameter>salt</parameter> minden generált kulcsra más-más
kell legyen, kellőkképpen véletlenszerű értékekkel, hogy különböző
kulcsok álljanak elő. A salt-nak ismertnek kell lennie,
amikor ellenőrzöd a kulcsokat, tehát jó ötlet ehhez fűzni
a kulcsokat. A salt-nak mindig nyolc karakter hosszúnak kell
lennie, ha rövidebbet adsz meg, nulákkal töltődik fel.
Tartsd szem előtt, hogy a felhasználók által beadott jelszavak
nem túlságosan alkalmasak titkosítási rendszerek kulcsaiként,
mivel a felhasználók általában jól begépelhető kulcsot
választanak. Ezek a jelszavak csak 6-7 bitet (vagy még
kevesebbet) használnak ki karakterenként. Nagyon ajánlott
a beadott jelszóra egy olyan átalakítás használata, mint
ez a függvény.
</para>
</refsect1>
</refentry>

View file

@ -144,7 +144,7 @@ print_r (readline_info());
</funcsynopsis>
<para>
If called with no parameters, this function returns an array of
values for all the setting readline uses. The elements will will
values for all the setting readline uses. The elements will
be indexed by the following values: done, end, erase_empty_line,
library_version, line_buffer, mark, pending_input, point, prompt,
readline_name, and terminal_name.

View file

@ -5,7 +5,7 @@
<partintro>
<para>
These functions are intended for work with <ulink url="&url.wddx;">WDDX</ulink>.</para>
<para>
Note that all the functions that serialize variables use the first
element of an array to determine whether the array is to be
@ -21,7 +21,7 @@ print wddx_serialize_value("PHP to WDDX packet example", "PHP packet");
?&gt;
</programlisting>
</example></para>
<para>
This example will produce:
<informalexample>
@ -48,7 +48,7 @@ print $packet;
?&gt;
</programlisting>
</example></para>
<para>
This example will produce:
@ -79,14 +79,14 @@ print $packet;
<parameter><optional>comment</optional></parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>wddx_serialize_value</function> is used to create a
WDDX packet from a single given value. It takes the value
contained in <parameter>var</parameter>, and an optional
<parameter>comment</parameter> string that appears in the packet
header, and returns the WDDX packet.</para>
</refsect1>
</refentry>
@ -106,18 +106,18 @@ print $packet;
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>wddx_serialize_vars</function> is used to create a WDDX
packet with a structure that contains the serialized
representation of the passed variables.</para>
<para>
<function>wddx_serialize_vars</function> takes a variable number
of arguments, each of which can be either a string naming a
variable or an array containing strings naming the variables or
another array, etc.</para>
<para>
<example>
<title>wddx_serialize_vars example</title>
@ -133,7 +133,7 @@ print wddx_serialize_vars("a", "b", $clvars);
?&gt;
</programlisting>
</example></para>
<para>
The above example will produce:
<programlisting>
@ -142,7 +142,7 @@ print wddx_serialize_vars("a", "b", $clvars);
&lt;string&gt;blue&lt;/string&gt;&lt;string&gt;orange&lt;/string&gt;&lt;string&gt;violet&lt;/string&gt;&lt;/array&gt;&lt;/var&gt;
&lt;var name='d'&gt;&lt;string&gt;colors&lt;/string&gt;&lt;/var&gt;&lt;/struct&gt;&lt;/data&gt;&lt;/wddxPacket&gt;
</programlisting></para>
</refsect1>
</refentry>
@ -160,14 +160,14 @@ print wddx_serialize_vars("a", "b", $clvars);
<parameter><optional>comment</optional></parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Use <function>wddx_packet_start</function> to start a new WDDX
packet for incremental addition of variables. It takes an
optional <parameter>comment</parameter> string and returns a
packet ID for use in later functions. It automatically creates a
structure definition inside the packet to contain the variables.</para>
</refsect1>
</refentry>
@ -184,19 +184,19 @@ print wddx_serialize_vars("a", "b", $clvars);
<paramdef>int <parameter>packet_id</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>wddx_packet_end</function> ends the WDDX packet
specified by the <parameter>packet_id</parameter> and returns the
string with the packet.</para>
</refsect1>
</refentry>
<refentry id="function.wddx-add-vars">
<refnamediv>
<refname>wddx_add_vars</refname>
<refpurpose>Ends a WDDX packet with the specified ID</refpurpose>
<refpurpose>Add variables to a WDDX packet with the specified ID</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -210,7 +210,7 @@ print wddx_serialize_vars("a", "b", $clvars);
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>wddx_add_vars</function> is used to serialize passed
variables and add the result to the packet specified by the
@ -234,7 +234,7 @@ print wddx_serialize_vars("a", "b", $clvars);
<paramdef>string <parameter>packet</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>wddx_deserialized</function> takes a
<parameter>packet</parameter> string and deserializes it. It