reference/mhash/functions/mhash-keygen-s2k.xml
8a2141dcc084f72feb4e0ae2feaff3b440e5c59e
...
...
@@ -1,22 +1,26 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xml:id="function.mhash-keygen-s2k" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.mhash-keygen-s2k">
4
4
<refnamediv>
5
5
<refname>mhash_keygen_s2k</refname>
6
6
<refpurpose>Generates a key</refpurpose>
7
7
</refnamediv>
8
8

9
+
<refsynopsisdiv>
10
+
&warn.deprecated.function-8-1-0;
11
+
</refsynopsisdiv>
12
+
9
13
<refsect1 role="description">
10
14
&reftitle.description;
11
15
<methodsynopsis>
12
-
<type>string</type><methodname>mhash_keygen_s2k</methodname>
13
-
<methodparam><type>int</type><parameter>hash</parameter></methodparam>
16
+
<type class="union"><type>string</type><type>false</type></type><methodname>mhash_keygen_s2k</methodname>
17
+
<methodparam><type>int</type><parameter>algo</parameter></methodparam>
14
18
<methodparam><type>string</type><parameter>password</parameter></methodparam>
15
19
<methodparam><type>string</type><parameter>salt</parameter></methodparam>
16
-
<methodparam><type>int</type><parameter>bytes</parameter></methodparam>
20
+
<methodparam><type>int</type><parameter>length</parameter></methodparam>
17
21
</methodsynopsis>
18
22
<para>
19
-
Generates a key according to the <parameter>hash</parameter> given a user
23
+
Generates a key according to the given <parameter>algo</parameter>, using an user
20
24
provided <parameter>password</parameter>.
21
25
</para>
22
26
<para>
...
...
@@ -38,11 +42,11 @@
38
42
<para>
39
43
<variablelist>
40
44
<varlistentry>
41
-
<term><parameter>hash</parameter></term>
45
+
<term><parameter>algo</parameter></term>
42
46
<listitem>
43
47
<para>
44
-
The hash id used to create the key.
45
-
One of the <literal>MHASH_XXX</literal> constants.
48
+
The hash ID used to create the key.
49
+
One of the <constant>MHASH_hashname</constant> constants.
46
50
</para>
47
51
</listitem>
48
52
</varlistentry>
...
...
@@ -50,7 +54,7 @@
50
54
<term><parameter>password</parameter></term>
51
55
<listitem>
52
56
<para>
53
-
User supplied password.
57
+
An user supplied password.
54
58
</para>
55
59
</listitem>
56
60
</varlistentry>
...
...
@@ -59,15 +63,15 @@
59
63
<listitem>
60
64
<para>
61
65
Must be different and random enough for every key you generate in
62
-
order to create different keys. That salt must be known when you check
63
-
the keys, thus it is a good idea to append the key to it. Salt has a
64
-
fixed length of 8 bytes and will be padded with zeros if you supply
65
-
less bytes.
66
+
order to create different keys. Because <parameter>salt</parameter>
67
+
must be known when you check the keys, it is a good idea to append
68
+
the key to it. Salt has a fixed length of 8 bytes and will be padded
69
+
with zeros if you supply less bytes.
66
70
</para>
67
71
</listitem>
68
72
</varlistentry>
69
73
<varlistentry>
70
-
<term><parameter>bytes</parameter></term>
74
+
<term><parameter>length</parameter></term>
71
75
<listitem>
72
76
<para>
73
77
The key length, in bytes.
...
...
@@ -84,8 +88,33 @@
84
88
Returns the generated key as a string, or &false; on error.
85
89
</para>
86
90
</refsect1>
87
-
</refentry>
88
91

92
+
<refsect1 role="changelog">
93
+
&reftitle.changelog;
94
+
<para>
95
+
<informaltable>
96
+
<tgroup cols="2">
97
+
<thead>
98
+
<row>
99
+
<entry>&Version;</entry>
100
+
<entry>&Description;</entry>
101
+
</row>
102
+
</thead>
103
+
<tbody>
104
+
<row>
105
+
<entry>8.1.0</entry>
106
+
<entry>
107
+
This function has been deprecated.
108
+
Use the <link linkend="ref.hash"><literal>hash_*()</literal> functions</link> instead.
109
+
</entry>
110
+
</row>
111
+
</tbody>
112
+
</tgroup>
113
+
</informaltable>
114
+
</para>
115
+
</refsect1>
116
+
117
+
</refentry>
89
118
<!-- Keep this comment at the end of the file
90
119
Local variables:
91
120
mode: sgml
92
121