upgrade to new doc style

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@283587 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Nilgün Belma Bugüner 2009-07-06 17:08:42 +00:00
parent 660ddc2fe3
commit 0167a2a94c
9 changed files with 317 additions and 58 deletions

View file

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- $Revision: 1.10 $ -->
<refentry xml:id="function.mcrypt-get-block-size" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mcrypt_get_block_size</refname>
<refpurpose>Get the block size of the specified cipher</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
@ -32,7 +32,7 @@
<function>mcrypt_module_open</function>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
@ -41,7 +41,7 @@
<term><parameter>cipher</parameter></term>
<listitem>
<para>
One of the <literal>MCRYPT_ciphername</literal> constants of the name
One of the <literal>MCRYPT_ciphername</literal> constants or the name
of the algorithm as string.
</para>
</listitem>

View file

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- $Revision: 1.10 $ -->
<refentry xml:id="function.mcrypt-get-cipher-name" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mcrypt_get_cipher_name</refname>
<refpurpose>Get the name of the specified cipher</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
@ -27,6 +27,30 @@
or &false;, if the cipher does not exist.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>cipher</parameter></term>
<listitem>
<para>
One of the <literal>MCRYPT_ciphername</literal> constants or the name
of the algorithm as string.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
This function returns the name of the cipher or &false;, if the cipher does
not exist.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;

View file

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<refentry xml:id="function.mcrypt-module-get-supported-key-sizes" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mcrypt_module_get_supported_key_sizes</refname>
<refpurpose>Returns an array with the supported keysizes of the opened algorithm</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
@ -17,12 +17,50 @@
Returns an array with the key sizes supported by the specified algorithm.
If it returns an empty array then all key sizes between 1 and
<function>mcrypt_module_get_algo_key_size</function> are supported by the
algorithm. The optional <parameter>lib_dir</parameter> parameter can
contain the location where the mode module is on the system.
algorithm.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
See also <function>mcrypt_enc_get_supported_key_sizes</function> which is
used on open encryption modules.
<variablelist>
<varlistentry>
<term><parameter>algorithm</parameter></term>
<listitem>
<para>
The algorithm to used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>lib_dir</parameter></term>
<listitem>
<para>
The optional <parameter>lib_dir</parameter> parameter can contain the
location of where the algorithm module is on the system.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns an array with the key sizes supported by the specified algorithm.
If it returns an empty array then all key sizes between 1 and
<function>mcrypt_module_get_algo_key_size</function> are supported by the
algorithm.
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>mcrypt_enc_get_supported_key_sizes</function></member>
</simplelist>
</para>
</refsect1>
</refentry>

View file

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- $Revision: 1.10 $ -->
<refentry xml:id="function.mcrypt-module-is-block-algorithm-mode" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mcrypt_module_is_block_algorithm_mode</refname>
<refpurpose>Returns if the specified module is a block algorithm or not</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
@ -16,9 +16,40 @@
<para>
This function returns &true; if the mode is for use with block
algorithms, otherwise it returns &false;. (e.g. &false; for stream, and
&true; for cbc, cfb, ofb). The optional <parameter>lib_dir</parameter>
parameter can contain the location where the mode module is on the
system.
&true; for cbc, cfb, ofb).
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>mode</parameter></term>
<listitem>
<para>
The mode to check.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>lib_dir</parameter></term>
<listitem>
<para>
The optional <parameter>lib_dir</parameter> parameter can contain the
location of where the algorithm module is on the system.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
This function returns &true; if the mode is for use with block
algorithms, otherwise it returns &false;. (e.g. &false; for stream, and
&true; for cbc, cfb, ofb).
</para>
</refsect1>
</refentry>

View file

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<refentry xml:id="function.mcrypt-module-is-block-algorithm" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mcrypt_module_is_block_algorithm</refname>
<refpurpose>This function checks whether the specified algorithm is a block algorithm</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
@ -15,9 +15,40 @@
</methodsynopsis>
<para>
This function returns &true; if the specified algorithm is a block
algorithm, or &false; is it is a stream algorithm. The optional
<parameter>lib_dir</parameter> parameter can contain the location where
the algorithm module is on the system.
algorithm, or &false; is it is a stream algorithm.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>algorithm</parameter></term>
<listitem>
<para>
The algorithm to check.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>lib_dir</parameter></term>
<listitem>
<para>
The optional <parameter>lib_dir</parameter> parameter can contain the
location of where the algorithm module is on the system.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
This function returns &true; if the specified algorithm is a block
algorithm, or &false; is it is a stream algorithm.
</para>
</refsect1>
</refentry>

View file

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- $Revision: 1.9 $ -->
<refentry xml:id="function.mcrypt-module-is-block-mode" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mcrypt_module_is_block_mode</refname>
<refpurpose>Returns if the specified mode outputs blocks or not</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
@ -16,9 +16,41 @@
<para>
This function returns &true; if the mode outputs blocks of bytes or
&false; if it outputs just bytes. (e.g. &true; for cbc and ecb, and
&false; for cfb and stream). The optional <parameter>lib_dir</parameter>
parameter can contain the location where the mode module is on the
system.
&false; for cfb and stream).
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>mode</parameter></term>
<listitem>
<para>
The mode to check.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>lib_dir</parameter></term>
<listitem>
<para>
The optional <parameter>lib_dir</parameter> parameter can contain the
location of where the algorithm module is on the system.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
This function returns &true; if the mode outputs blocks of bytes or
&false; if it outputs just bytes. (e.g. &true; for cbc and ecb, and
&false; for cfb and stream).
</para>
</refsect1>
</refentry>

View file

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.14 $ -->
<!-- $Revision: 1.15 $ -->
<refentry xml:id="function.mcrypt-module-open" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mcrypt_module_open</refname>
<refpurpose>Opens the module of the algorithm and the mode to be used</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
@ -19,18 +19,61 @@
This function opens the module of the algorithm and the mode to be used.
The name of the algorithm is specified in algorithm, e.g. <literal>"twofish"</literal> or is
one of the <constant>MCRYPT_ciphername</constant> constants. The module is closed by calling
<function>mcrypt_module_close</function>. Normally it returns an
encryption descriptor, or &false; on error.
<function>mcrypt_module_close</function>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
The <parameter>algorithm_directory</parameter> and
<parameter>mode_directory</parameter> are used to locate the encryption
modules. When you supply a directory name, it is used. When you set one
of these to the empty string (<literal>""</literal>), the value set by the
<parameter>mcrypt.algorithms_dir</parameter> or
<parameter>mcrypt.modes_dir</parameter> ini-directive is used. When
these are not set, the default directories that are used are the ones
that were compiled in into libmcrypt (usually <filename>/usr/local/lib/libmcrypt</filename>).
<variablelist>
<varlistentry>
<term><parameter>algorithm</parameter></term>
<listitem>
<para>
The algorithm to be used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>algorithm_directory</parameter></term>
<listitem>
<para>
The <parameter>algorithm_directory</parameter> and
<parameter>mode_directory</parameter> are used to locate the encryption
modules. When you supply a directory name, it is used. When you set one
of these to the empty string (<literal>""</literal>), the value set by
the <parameter>mcrypt.algorithms_dir</parameter> or
<parameter>mcrypt.modes_dir</parameter> ini-directive is used. When
these are not set, the default directories that are used are the ones
that were compiled in into libmcrypt (usually
<filename>/usr/local/lib/libmcrypt</filename>).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>mode</parameter></term>
<listitem>
<para>
The mode to be used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>mode_directory</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Normally it returns an encryption descriptor, or &false; on error.
</para>
</refsect1>
@ -58,10 +101,7 @@
strings as name for the cipher and mode, this only works when the
extension is linked against libmcrypt 2.4.x or 2.5.x.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Using <function>mcrypt_module_open</function> in encryption</title>
@ -105,13 +145,18 @@
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
See also
<function>mcrypt_module_close</function>,
<function>mcrypt_generic</function>,
<function>mdecrypt_generic</function>,
<function>mcrypt_generic_init</function>, and
<function>mcrypt_generic_deinit</function>.
<simplelist>
<member><function>mcrypt_module_close</function></member>
<member><function>mcrypt_generic</function></member>
<member><function>mdecrypt_generic</function></member>
<member><function>mcrypt_generic_init</function></member>
<member><function>mcrypt_generic_deinit</function></member>
</simplelist>
</para>
</refsect1>
</refentry>

View file

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- $Revision: 1.9 $ -->
<refentry xml:id="function.mcrypt-module-self-test" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mcrypt_module_self_test</refname>
<refpurpose>This function runs a self test on the specified module</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
@ -14,10 +14,37 @@
<methodparam choice="opt"><type>string</type><parameter>lib_dir</parameter></methodparam>
</methodsynopsis>
<para>
This function runs the self test on the algorithm specified. The
optional <parameter>lib_dir</parameter> parameter can contain the
location of where the algorithm module is on the system.
This function runs the self test on the algorithm specified.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>algorithm</parameter></term>
<listitem>
<para>
The algorithm to test.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>lib_dir</parameter></term>
<listitem>
<para>
The optional <parameter>lib_dir</parameter> parameter can contain the
location of where the algorithm module is on the system.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The function returns &true; if the self test succeeds, or &false; when if
fails.

View file

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- $Revision: 1.10 $ -->
<refentry xml:id="function.mdecrypt-generic" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mdecrypt_generic</refname>
<refpurpose>Decrypt data</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
@ -20,6 +20,31 @@
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>td</parameter></term>
<listitem>
<para>
An encryption descriptor returned by
<function>mcrypt_module_open</function>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>data</parameter></term>
<listitem>
<para>
Encrypted data.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
@ -78,10 +103,16 @@
encryption buffers by calling <function>mcrypt_generic_deinit</function>.
See <function>mcrypt_module_open</function> for an example.
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
See also <function>mcrypt_generic</function>,
<function>mcrypt_generic_init</function>, and
<function>mcrypt_generic_deinit</function>.
<simplelist>
<member><function>mcrypt_generic</function></member>
<member><function>mcrypt_generic_init</function></member>
<member><function>mcrypt_generic_deinit</function></member>
</simplelist>
</para>
</refsect1>
</refentry>