reference/hash/functions/hash-file.xml
20dcfbb0dd7150cbe5dfd7903a3001229295c549
...
...
@@ -13,6 +13,7 @@
13
13
<methodparam><type>string</type><parameter>algo</parameter></methodparam>
14
14
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
15
15
<methodparam choice="opt"><type>bool</type><parameter>binary</parameter><initializer>&false;</initializer></methodparam>
16
+
<methodparam choice="opt"><type>array</type><parameter>options</parameter><initializer>[]</initializer></methodparam>
16
17
</methodsynopsis>
17
18

18
19
</refsect1>
...
...
@@ -45,6 +46,15 @@
45
46
</para>
46
47
</listitem>
47
48
</varlistentry>
49
+
<varlistentry>
50
+
<term><parameter>options</parameter></term>
51
+
<listitem>
52
+
<para>
53
+
An array of options for the various hashing algorithms. Currently, only the "seed" parameter is
54
+
supported by the MurmurHash variants.
55
+
</para>
56
+
</listitem>
57
+
</varlistentry>
48
58
</variablelist>
49
59
</para>
50
60
</refsect1>
...
...
@@ -58,6 +68,28 @@
58
68
</para>
59
69
</refsect1>
60
70

71
+
<refsect1 role="changelog">
72
+
&reftitle.changelog;
73
+
<para>
74
+
<informaltable>
75
+
<tgroup cols="2">
76
+
<thead>
77
+
<row>
78
+
<entry>&Version;</entry>
79
+
<entry>&Description;</entry>
80
+
</row>
81
+
</thead>
82
+
<tbody>
83
+
<row>
84
+
<entry>8.1.0</entry>
85
+
<entry>The <parameter>options</parameter> parameter has been added.</entry>
86
+
</row>
87
+
</tbody>
88
+
</tgroup>
89
+
</informaltable>
90
+
</para>
91
+
</refsect1>
92
+

61
93
<refsect1 role="examples">
62
94
&reftitle.examples;
63
95
<para>
...
...
@@ -69,14 +101,14 @@
69
101
/* Create a file to calculate hash of */
70
102
file_put_contents('example.txt', 'The quick brown fox jumped over the lazy dog.');
71
103

72
-
echo hash_file('md5', 'example.txt');
104
+
echo hash_file('sha256', 'example.txt');
73
105
?>
74
106
]]>
75
107
</programlisting>
76
108
&example.outputs;
77
109
<screen>
78
110
<![CDATA[
79
-
5c6ffbdd40d9556b73a21e63c3e0e904
111
+
68b1282b91de2c054c36629cb8dd447f12f096d3e3c587978dc2248444633483
80
112
]]>
81
113
</screen>
82
114
</example>
83
115