reference/hash/functions/hash-update-stream.xml
20dcfbb0dd7150cbe5dfd7903a3001229295c549
...
...
@@ -10,7 +10,7 @@
10
10
<methodsynopsis>
11
11
<type>int</type><methodname>hash_update_stream</methodname>
12
12
<methodparam><type>HashContext</type><parameter>context</parameter></methodparam>
13
-
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
13
+
<methodparam><type>resource</type><parameter>stream</parameter></methodparam>
14
14
<methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>-1</initializer></methodparam>
15
15
</methodsynopsis>
16
16

...
...
@@ -28,7 +28,7 @@
28
28
</listitem>
29
29
</varlistentry>
30
30
<varlistentry>
31
-
<term><parameter>handle</parameter></term>
31
+
<term><parameter>stream</parameter></term>
32
32
<listitem>
33
33
<para>
34
34
Open file handle as returned by any stream creation function.
...
...
@@ -39,7 +39,7 @@
39
39
<term><parameter>length</parameter></term>
40
40
<listitem>
41
41
<para>
42
-
Maximum number of characters to copy from <parameter>handle</parameter>
42
+
Maximum number of characters to copy from <parameter>stream</parameter>
43
43
into the hashing context.
44
44
</para>
45
45
</listitem>
...
...
@@ -51,7 +51,7 @@
51
51
<refsect1 role="returnvalues">
52
52
&reftitle.returnvalues;
53
53
<para>
54
-
Actual number of bytes added to the hashing context from <parameter>handle</parameter>.
54
+
Actual number of bytes added to the hashing context from <parameter>stream</parameter>.
55
55
</para>
56
56
</refsect1>
57
57

...
...
@@ -88,10 +88,11 @@
88
88
<![CDATA[
89
89
<?php
90
90
$fp = tmpfile();
91
-
fwrite($fp, 'The quick brown fox jumped over the lazy dog.');
91
+
fwrite($fp, 'jumped over the lazy dog.');
92
92
rewind($fp);
93
93

94
-
$ctx = hash_init('md5');
94
+
$ctx = hash_init('sha256');
95
+
hash_update($ctx, 'The quick brown fox ');
95
96
hash_update_stream($ctx, $fp);
96
97
echo hash_final($ctx);
97
98
?>
...
...
@@ -100,7 +101,7 @@ echo hash_final($ctx);
100
101
&example.outputs;
101
102
<screen>
102
103
<![CDATA[
103
-
5c6ffbdd40d9556b73a21e63c3e0e904
104
+
68b1282b91de2c054c36629cb8dd447f12f096d3e3c587978dc2248444633483
104
105
]]>
105
106
</screen>
106
107
</example>
...
...
@@ -121,7 +122,6 @@ echo hash_final($ctx);
121
122
</refsect1>
122
123

123
124
</refentry>
124
-

125
125
<!-- Keep this comment at the end of the file
126
126
Local variables:
127
127
mode: sgml
128
128