hash_update_file

アクティブなハッシュコンテキストに、ファイルからデータを投入する

説明

bool hash_update_file(HashContext $context, string $filename, resourcenull $stream_context = null)

パラメータ

context

hash_init が返すハッシュコンテキスト。

filename

ハッシュ対象となるファイルの位置を示す URL。 fopen ラッパーをサポートしています。

stream_context

stream_context_create が返す ストリームコンテキスト。

戻り値

成功した場合に true を、失敗した場合に false を返します。

変更履歴

バージョン 説明
8.0.0 stream_context は、nullable になりました。
7.2.0 リソースの代わりに HashContext を受け入れるようになりました。

参考

  • hash_init
  • hash_update
  • hash_update_stream
  • hash_final
  • hash
  • hash_file