correct markup

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@279009 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Yannick Torres 2009-04-19 20:10:23 +00:00
parent 2303912e5a
commit ffe7c9a8a5
7 changed files with 89 additions and 76 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<appendix xml:id="mcrypt.ciphers" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Mcrypt ciphers</title>
@ -56,7 +56,8 @@
</itemizedlist>
</para>
<para>
You must (in CFB and OFB mode) or can (in CBC mode) supply an
You must (in <constant>CFB</constant> and <constant>OFB</constant> mode)
or can (in <constant>CBC</constant> mode) supply an
initialization vector (IV) to the respective cipher function. The
IV must be unique and must be the same when
decrypting/encrypting. With data which is stored encrypted, you

View file

@ -1,39 +1,45 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<appendix xml:id="mcrypt.constants" xmlns="http://docbook.org/ns/docbook">
&reftitle.constants;
&extension.constants;
<para>
Mcrypt can operate in four block cipher modes (CBC, OFB, CFB, and
ECB). If linked against libmcrypt-2.4.x or higher the functions can also operate
in the block cipher mode nOFB and in STREAM mode. Below you find a list
with all supported encryption modes together with the constants that are
Mcrypt can operate in four block cipher modes (<literal>CBC</literal>,
<literal>OFB</literal>, <literal>CFB</literal>, and
<literal>ECB</literal>). If linked against libmcrypt-2.4.x or higher the
functions can also operate in the block cipher mode <literal>nOFB</literal>
and in <literal>STREAM</literal> mode. Below you find a list with all
supported encryption modes together with the constants that are
defines for the encryption mode. For a more complete reference and
discussion see &book.applied.cryptography;.
<itemizedlist>
<listitem>
<simpara>
MCRYPT_MODE_ECB (electronic codebook) is suitable for random data,
<constant>MCRYPT_MODE_ECB</constant> (<literal>electronic
codebook</literal>) is suitable for random data,
such as encrypting other keys. Since data there is short and random,
the disadvantages of ECB have a favorable negative effect.
</simpara>
</listitem>
<listitem>
<simpara>
MCRYPT_MODE_CBC (cipher block chaining) is especially suitable for
encrypting files where the security is increased over ECB
<constant>MCRYPT_MODE_CBC</constant> (<literal>cipher block
chaining</literal>) is especially suitable for
encrypting files where the security is increased over <literal>ECB</literal>
significantly.
</simpara>
</listitem>
<listitem>
<simpara>
MCRYPT_MODE_CFB (cipher feedback) is the best mode for encrypting byte
<constant>MCRYPT_MODE_CFB</constant> (<literal>cipher
feedback</literal>) is the best mode for encrypting byte
streams where single bytes must be encrypted.
</simpara>
</listitem>
<listitem>
<simpara>
MCRYPT_MODE_OFB (output feedback, in 8bit) is comparable to CFB, but
<constant>MCRYPT_MODE_OFB</constant> (<literal>output feedback, in
8bit</literal>) is comparable to <literal>CFB</literal>, but
can be used in applications where error propagation cannot
be tolerated. It's insecure (because it operates in 8bit
mode) so it is not recommended to use it.
@ -41,14 +47,15 @@
</listitem>
<listitem>
<simpara>
MCRYPT_MODE_NOFB (output feedback, in nbit) is comparable to OFB, but
<constant>MCRYPT_MODE_NOFB</constant> (<literal>output feedback,
in nbit</literal>) is comparable to OFB, but
more secure because it operates on the block size of the algorithm.
</simpara>
</listitem>
<listitem>
<simpara>
MCRYPT_MODE_STREAM is an extra mode to include some stream algorithms
like WAKE or RC4.
<constant>MCRYPT_MODE_STREAM</constant> is an extra mode to include
some stream algorithms like <literal>"WAKE"</literal> or <literal>"RC4"</literal>.
</simpara>
</listitem>
</itemizedlist>

View file

@ -1,17 +1,19 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<appendix xml:id="mcrypt.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.examples;
<para>
Mcrypt can be used to encrypt and decrypt using the above
mentioned ciphers. If you linked against libmcrypt-2.2.x, the
mentioned ciphers. If you linked against <literal>libmcrypt-2.2.x</literal>, the
four important mcrypt commands (<function>mcrypt_cfb</function>,
<function>mcrypt_cbc</function>, <function>mcrypt_ecb</function>,
and <function>mcrypt_ofb</function>) can operate in both modes
which are named MCRYPT_ENCRYPT and MCRYPT_DECRYPT, respectively.
which are named <constant>MCRYPT_ENCRYPT</constant> and
<constant>MCRYPT_DECRYPT</constant>, respectively.
<example>
<title>Encrypt an input value with TripleDES under 2.2.x in ECB mode</title>
<title>Encrypt an input value with <literal>TripleDES</literal>
under 2.2.x in <literal>ECB</literal> mode</title>
<programlisting role="php">
<![CDATA[
<?php
@ -30,7 +32,7 @@ $encrypted_data = mcrypt_ecb (MCRYPT_3DES, $key, $input, MCRYPT_ENCRYPT);
If you linked against libmcrypt 2.4.x or 2.5.x, these functions are still
available, but it is recommended that you use the advanced functions.
<example>
<title>Encrypt an input value with TripleDES under 2.4.x and higher in ECB mode</title>
<title>Encrypt an input value with <literal>TripleDES</literal> under 2.4.x and higher in <literal>ECB</literal> mode</title>
<programlisting role="php">
<![CDATA[
<?php

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- $Revision: 1.10 $ -->
<refentry xml:id="function.mcrypt-list-algorithms" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mcrypt_list_algorithms</refname>
@ -61,7 +61,7 @@
</programlisting>
<para>
The above example will produce a list with all supported
algorithms in the "/usr/local/lib/libmcrypt" directory.
algorithms in the "<filename>/usr/local/lib/libmcrypt</filename>" directory.
</para>
</example>
</para>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- $Revision: 1.10 $ -->
<refentry xml:id="function.mcrypt-list-modes" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mcrypt_list_modes</refname>
@ -27,8 +27,8 @@
<listitem>
<para>
Specifies the directory where all modes are located. If not
specifies, the value of the mcrypt.modes_dir &php.ini; directive
is used.
specifies, the value of the <literal>mcrypt.modes_dir</literal>
&php.ini; directive is used.
</para>
</listitem>
</varlistentry>
@ -63,7 +63,7 @@
The above example will produce a list with all supported
algorithms in the default mode directory. If it is not set
with the ini directive mcrypt.modes_dir, the default directory
of mcrypt is used (which is /usr/local/lib/libmcrypt).
of mcrypt is used (which is <filename>/usr/local/lib/libmcrypt</filename>).
</para>
</example>
</para>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.13 $ -->
<!-- $Revision: 1.14 $ -->
<refentry xml:id="function.mcrypt-module-open" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mcrypt_module_open</refname>
@ -17,8 +17,8 @@
</methodsynopsis>
<para>
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. "twofish" or is
one of the MCRYPT_ciphername constants. The module is closed by calling
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.
</para>
@ -26,11 +26,11 @@
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 (""), the value set by the
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 /usr/local/lib/libmcrypt).
that were compiled in into libmcrypt (usually <filename>/usr/local/lib/libmcrypt</filename>).
</para>
</refsect1>
@ -52,8 +52,8 @@
</example>
</para>
<para>
The first line in the example above will try to open the DES cipher from
the default directory and the EBC mode from the directory
The first line in the example above will try to open the <literal>DES</literal> cipher from
the default directory and the <literal>EBC</literal> mode from the directory
<filename>/usr/lib/mcrypt-modes</filename>. The second example uses
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.

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- $Revision: 1.10 $ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.udm-set-agent-param">
<refnamediv>
<refname>udm_set_agent_param</refname>
@ -40,52 +40,55 @@
<itemizedlist>
<listitem>
<simpara>
UDM_PARAM_PAGE_NUM - used to choose search results page number (results
are returned by pages beginning from 0, with UDM_PARAM_PAGE_SIZE results per page).
<constant>UDM_PARAM_PAGE_NUM</constant> - used to choose search results page number (results
are returned by pages beginning from 0, with <constant>UDM_PARAM_PAGE_SIZE</constant> results per page).
</simpara>
</listitem>
<listitem>
<simpara>
UDM_PARAM_PAGE_SIZE - number of search results displayed on one page.
<constant>UDM_PARAM_PAGE_SIZE</constant> - number of search results displayed on one page.
</simpara>
</listitem>
<listitem>
<simpara>
UDM_PARAM_SEARCH_MODE - search mode. The following values available: UDM_MODE_ALL -
search for all words; UDM_MODE_ANY - search for any word; UDM_MODE_PHRASE -
phrase search; UDM_MODE_BOOL - boolean search. See <function>udm_find</function>
<constant>UDM_PARAM_SEARCH_MODE</constant> - search mode. The following values available: <constant>UDM_MODE_ALL</constant> -
search for all words; <constant>UDM_MODE_ANY</constant> - search for any word; <constant>UDM_MODE_PHRASE</constant> -
phrase search; <constant>UDM_MODE_BOOL</constant> - boolean search. See <function>udm_find</function>
for details on boolean search.
</simpara>
</listitem>
<listitem>
<simpara>
UDM_PARAM_CACHE_MODE - turns on or off search result cache mode.
<constant>UDM_PARAM_CACHE_MODE</constant> - turns on or off search result cache mode.
When enabled, the search engine will store
search results to disk. In case a similar search is performed later,
the engine will take results from the cache for faster performance.
Available values: UDM_CACHE_ENABLED, UDM_CACHE_DISABLED.
Available values: <constant>UDM_CACHE_ENABLED</constant>,
<constant>UDM_CACHE_DISABLED</constant>.
</simpara>
</listitem>
<listitem>
<simpara>
UDM_PARAM_TRACK_MODE - turns on or off trackquery mode. Since
<constant>UDM_PARAM_TRACK_MODE</constant> - turns on or off trackquery mode. Since
version 3.1.2 mnoGoSearch has a query tracking support.
Note that tracking is implemented in SQL version only and not available
in built-in database.
To use tracking, you have to create tables for tracking support.
For MySQL, use create/mysql/track.txt.
For MySQL, use <filename>create/mysql/track.txt</filename>.
When doing a search, front-end uses those tables to store query words,
a number of found documents and current Unix timestamp in seconds.
Available values: UDM_TRACK_ENABLED, UDM_TRACK_DISABLED.
Available values: <constant>UDM_TRACK_ENABLED</constant>,
<constant>UDM_TRACK_DISABLED</constant>.
</simpara>
</listitem>
<listitem>
<simpara>
UDM_PARAM_PHRASE_MODE - defines whether index database using phrases
<constant>UDM_PARAM_PHRASE_MODE</constant> - defines whether index database using phrases
("phrase" parameter in indexer.conf).
Possible values: UDM_PHRASE_ENABLED and UDM_PHRASE_DISABLED.
Please note, that if phrase search is enabled (UDM_PHRASE_ENABLED),
it is still possible to do search in any mode (ANY, ALL, BOOL or PHRASE).
Possible values: <constant>UDM_PHRASE_ENABLED</constant> and <constant>UDM_PHRASE_DISABLED</constant>.
Please note, that if phrase search is enabled (<constant>UDM_PHRASE_ENABLED</constant>),
it is still possible to do search in any mode (<literal>ANY</literal>, <literal>ALL</literal>,
<literal>BOOL</literal> or <literal>PHRASE</literal>).
In 3.1.10 version of mnoGoSearch phrase search is supported only in sql
and built-in database modes,
while beginning with 3.1.11 phrases are supported in cachemode as well.
@ -94,40 +97,40 @@
Examples of phrase search:
</simpara>
<simpara>
"Arizona desert" - This query returns all indexed documents that contain
<literal>"Arizona desert"</literal> - This query returns all indexed documents that contain
"Arizona desert" as a phrase. Notice that you need to put double quotes
around the phrase
</simpara>
</listitem>
<listitem>
<simpara>
UDM_PARAM_CHARSET - defines local charset. Available values: set of
<constant>UDM_PARAM_CHARSET</constant> - defines local charset. Available values: set of
charsets supported by mnoGoSearch, e.g. koi8-r, cp1251, ...
</simpara>
</listitem>
<listitem>
<simpara>
UDM_PARAM_STOPFILE - Defines name and path
<constant>UDM_PARAM_STOPFILE</constant> - Defines name and path
to stopwords file. (There is a small difference with mnoGoSearch
- while in mnoGoSearch if relative path or no path entered, it
looks for this file in relation to UDM_CONF_DIR, the module looks for
looks for this file in relation to <constant>UDM_CONF_DIR</constant>, the module looks for
the file in relation to current path, i.e. to the path where the
PHP script is executed.)
</simpara>
</listitem>
<listitem>
<simpara>
UDM_PARAM_STOPTABLE - Load stop words from the given SQL table. You may use
<constant>UDM_PARAM_STOPTABLE</constant> - Load stop words from the given SQL table. You may use
several StopwordTable commands.
This command has no effect when compiled without SQL database support.
</simpara>
</listitem>
<listitem>
<simpara>
UDM_PARAM_WEIGHT_FACTOR - represents weight factors for specific document parts.
<constant>UDM_PARAM_WEIGHT_FACTOR</constant> - represents weight factors for specific document parts.
Currently body, title, keywords, description, url are supported.
To activate this feature please use degrees of 2 in *Weight commands of
the indexer.conf. Let's imagine that we have these weights:
the <filename>indexer.conf</filename>. Let's imagine that we have these weights:
</simpara>
<literallayout>
URLWeight 1
@ -146,7 +149,7 @@
</simpara>
<simpara>
This parameter's value is a string of hex digits ABCDE. Each digit is a
This parameter's value is a string of hex digits <literal>ABCDE</literal>. Each digit is a
factor for corresponding bit in word weight. For the given above weights
configuration:
</simpara>
@ -161,17 +164,17 @@
Examples:
</simpara>
<simpara>
UDM_PARAM_WEIGHT_FACTOR=00001 will search through URLs only.
<constant>UDM_PARAM_WEIGHT_FACTOR</constant>=00001 will search through URLs only.
</simpara>
<simpara>
UDM_PARAM_WEIGHT_FACTOR=00100 will search through Titles only.
<constant>UDM_PARAM_WEIGHT_FACTOR</constant>=00100 will search through Titles only.
</simpara>
<simpara>
UDM_PARAM_WEIGHT_FACTOR=11100 will search through Title,Keywords,Description
<constant>UDM_PARAM_WEIGHT_FACTOR</constant>=11100 will search through Title,Keywords,Description
but not through URL and Body.
</simpara>
<simpara>
UDM_PARAM_WEIGHT_FACTOR=F9421 will search through:
<constant>UDM_PARAM_WEIGHT_FACTOR</constant>=F9421 will search through:
</simpara>
<literallayout>
Description with factor 15 (F hex)
@ -181,36 +184,36 @@
URL with factor 1
</literallayout>
<simpara>
If UDM_PARAM_WEIGHT_FACTOR variable is omitted, original weight value is
If <constant>UDM_PARAM_WEIGHT_FACTOR</constant> variable is omitted, original weight value is
taken to sort results. For a given above weight configuration it means
that document description has a most big weight 16.
</simpara>
</listitem>
<listitem>
<simpara>
UDM_PARAM_WORD_MATCH - word match. You may use this parameter to choose
<constant>UDM_PARAM_WORD_MATCH</constant> - word match. You may use this parameter to choose
word match type. This feature works only in "single" and "multi" modes
using SQL based and built-in database. It does not work in cachemode and other modes
since they use word CRC and do not support substring search. Available values:
</simpara>
<simpara>UDM_MATCH_BEGIN - word beginning match;</simpara>
<simpara>UDM_MATCH_END - word ending match;</simpara>
<simpara>UDM_MATCH_WORD - whole word match;</simpara>
<simpara>UDM_MATCH_SUBSTR - word substring match.</simpara>
<simpara><constant>UDM_MATCH_BEGIN</constant> - word beginning match;</simpara>
<simpara><constant>UDM_MATCH_END</constant> - word ending match;</simpara>
<simpara><constant>UDM_MATCH_WORD</constant> - whole word match;</simpara>
<simpara><constant>UDM_MATCH_SUBSTR</constant> - word substring match.</simpara>
</listitem>
<listitem>
<simpara>
UDM_PARAM_MIN_WORD_LEN - defines minimal word length.
<constant>UDM_PARAM_MIN_WORD_LEN</constant> - defines minimal word length.
Any word shorter this limit is considered to be a stopword. Please note
that this parameter value is inclusive, i.e. if UDM_PARAM_MIN_WORD_LEN=3,
that this parameter value is inclusive, i.e. if <constant>UDM_PARAM_MIN_WORD_LEN</constant>=3,
a word 3 characters long will not be considered a stopword, while
a word 2 characters long will be. Default value is 1.
</simpara>
</listitem>
<listitem>
<simpara>
UDM_PARAM_ISPELL_PREFIXES - Possible values: UDM_PREFIXES_ENABLED and
UDM_PREFIXES_DISABLED, that respectively enable or disable using prefixes.
<constant>UDM_PARAM_ISPELL_PREFIXES</constant> - Possible values: <constant>UDM_PREFIXES_ENABLED</constant> and
<constant>UDM_PREFIXES_DISABLED</constant>, that respectively enable or disable using prefixes.
E.g. if a word "tested" is in search query, also words like "test",
"testing", etc. Only suffixes are supported by default. Prefixes usually
change word meanings, for example if somebody is searching for the word "tested"
@ -221,8 +224,8 @@
</listitem>
<listitem>
<simpara>
UDM_PARAM_CROSS_WORDS - enables or disables crosswords support.
Possible values: UDM_CROSS_WORDS_ENABLED and UDM_CROSS_WORDS_DISABLED.
<constant>UDM_PARAM_CROSS_WORDS</constant> - enables or disables crosswords support.
Possible values: <constant>UDM_CROSS_WORDS_ENABLED</constant> and <constant>UDM_CROSS_WORDS_DISABLED</constant>.
</simpara>
<simpara>
The crosswords feature allows to assign words between &lt;a href="xxx"&gt; and &lt;/a&gt;
@ -232,10 +235,10 @@
</listitem>
<listitem>
<simpara>
UDM_PARAM_VARDIR - specifies a custom path to directory where indexer
<constant>UDM_PARAM_VARDIR</constant> - specifies a custom path to directory where indexer
stores data when using built-in database and in cache mode.
By default <literal>/var</literal> directory of
mnoGoSearch installation is used. Can have
<application>mnoGoSearch</application> installation is used. Can have
only string values.
</simpara>
</listitem>
@ -289,7 +292,7 @@
&reftitle.notes;
<note>
<simpara>
Crosswords are supported only in mnoGoSearch 3.1.11 or later.
Crosswords are supported only in <application>mnoGoSearch</application> 3.1.11 or later.
</simpara>
</note>
</refsect1>