文字

hash_update_file

(PHP 5 >= 5.1.2, PECL hash >= 1.1)

hash_update_file从文件向活跃的哈希运算上下文中填充数据

说明

bool hash_update_file ( resource $hcontext , string $filename [, resource $scontext = NULL ] )

参数

hcontext

hash_init() 函数返回的哈希运算上下文。

filename

要进行哈希运算的文件路径,支持 fopen 封装器。

scontext

stream_context_create() 函数返回的流上下文。

返回值

成功时返回 TRUE , 或者在失败时返回 FALSE

参见

  • hash_init() - 初始化增量哈希运算上下文
  • hash_update() - 向活跃的哈希运算上下文中填充数据
  • hash_update_stream() - 从打开的流向活跃的哈希运算上下文中填充数据
  • hash_final() - 结束增量哈希,并且返回摘要结果
  • hash() - 生成哈希值 (消息摘要)
  • hash_file() - 使用给定文件的内容生成哈希值
上一篇: 下一篇: