(PHP 5 >= 5.1.2, PHP 7, PECL hash >= 1.1)
hash_update_stream — �Ӵ������Ծ�Ĺ�ϣ�������������������
$context
, resource $handle
[, int $length = -1
] ) : int
context�� hash_init() �������صĹ�ϣ���������ġ�
handle�������ĺ������صĴ��ļ������
length
Ҫ�� handle ���Ծ�Ĺ�ϣ�����������п���
������ַ�����
�� handle ���ϣ������������ʵ�������ֽ�������
| �汾 | ˵�� |
|---|---|
| 7.2.0 | ���ղ�������Դ������Ϊ HashContext �������͡� |
Example #1 hash_update_stream() ����
<?php
$fp = tmpfile();
fwrite($fp, 'The quick brown fox jumped over the lazy dog.');
rewind($fp);
$ctx = hash_init('md5');
hash_update_stream($ctx, $fp);
echo hash_final($ctx);
?>
�������̻������
5c6ffbdd40d9556b73a21e63c3e0e904