<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Pump data into an active hashing context from a file</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.hash-pbkdf2.html">hash_pbkdf2</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.hash-update-stream.html">hash_update_stream</a></div> <div class="up"><a href="ref.hash.html">Hash Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.hash-update-file" class="refentry"> <div class="refnamediv"> <h1 class="refname">hash_update_file</h1> <p class="verinfo">(PHP 5 >= 5.1.2, PECL hash >= 1.1)</p><p class="refpurpose"><span class="refname">hash_update_file</span> — <span class="dc-title">Pump data into an active hashing context from a file</span></p> </div> <div class="refsect1 description" id="refsect1-function.hash-update-file-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><strong>hash_update_file</strong></span> ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$hcontext</code></span> , <span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span> [, <span class="methodparam"><span class="type">resource</span> <code class="parameter">$scontext</code><span class="initializer"> = <strong><code>NULL</code></strong></span></span> ] )</div> </div> <div class="refsect1 parameters" id="refsect1-function.hash-update-file-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">hcontext</code></em></span> <dd> <p class="para"> Hashing context returned by <span class="function"><a href="function.hash-init.html" class="function">hash_init()</a></span>. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">filename</code></em></span> <dd> <p class="para"> URL describing location of file to be hashed; Supports fopen wrappers. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">scontext</code></em></span> <dd> <p class="para"> Stream context as returned by <span class="function"><a href="function.stream-context-create.html" class="function">stream_context_create()</a></span>. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.hash-update-file-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure. </p> </div> <div class="refsect1 seealso" id="refsect1-function.hash-update-file-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="function"><a href="function.hash-init.html" class="function" rel="rdfs-seeAlso">hash_init()</a> - Initialize an incremental hashing context</span></li> <li class="member"> <span class="function"><a href="function.hash-update.html" class="function" rel="rdfs-seeAlso">hash_update()</a> - Pump data into an active hashing context</span></li> <li class="member"> <span class="function"><a href="function.hash-update-stream.html" class="function" rel="rdfs-seeAlso">hash_update_stream()</a> - Pump data into an active hashing context from an open stream</span></li> <li class="member"> <span class="function"><a href="function.hash-final.html" class="function" rel="rdfs-seeAlso">hash_final()</a> - Finalize an incremental hash and return resulting digest</span></li> <li class="member"> <span class="function"><a href="function.hash.html" class="function" rel="rdfs-seeAlso">hash()</a> - Generate a hash value (message digest)</span></li> <li class="member"> <span class="function"><a href="function.hash-file.html" class="function" rel="rdfs-seeAlso">hash_file()</a> - Generate a hash value using the contents of a given file</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.hash-pbkdf2.html">hash_pbkdf2</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.hash-update-stream.html">hash_update_stream</a></div> <div class="up"><a href="ref.hash.html">Hash Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>