PHP 8.4.7 Released!

hash_update_file

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

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

説明

hash_update_file(HashContext $context, string $filename, ?resource $stream_context = null): bool

パラメータ

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_file() - ファイルの内容から、ハッシュ値を生成する

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant