<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.strings.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.sha1-file.php',
    1 => 'sha1_file',
    2 => 'Calcola l\'hash sha1 di un file',
  ),
  'up' => 
  array (
    0 => 'ref.strings.php',
    1 => 'String Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.sha1.php',
    1 => 'sha1',
  ),
  'next' => 
  array (
    0 => 'function.similar-text.php',
    1 => 'similar_text',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'it',
    'path' => 'reference/strings/functions/sha1-file.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.sha1-file" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">sha1_file</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">sha1_file</span> &mdash; <span class="dc-title">Calcola l&#039;hash sha1 di un file</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.sha1-file-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>sha1_file</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$filename</code></span>, <span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$raw_output</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="simpara">
   Calcola l&#039;hash sha1 di <code class="parameter">filename</code> usando il
   <a href="https://datatracker.ietf.org/doc/html/rfc3174" class="link external">&raquo;&nbsp;US Secure Hash Algorithm 1</a>,
   e restituisce l&#039;hash. L&#039;hash è un numero esadecimale di 40 caratteri.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.sha1-file-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">filename</code></dt>
     <dd>
      <p class="para">
       Il nome del file
      </p>
     </dd>
    
    
     <dt><code class="parameter">raw_output</code></dt>
     <dd>
      <p class="para">
       Quando è impostato a <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>, l&#039;hash sha1 è restituito in formato binario con una
       lunghezza di 20 caratteri. Per default vale <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.sha1-file-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Restituisce una stringa se ha successo, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> negli altri casi.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.sha1-file-changelog">
  <h3 class="title">Log delle modifiche</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Versione</th>
       <th>Descrizione</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>5.0.0</td>
       <td>
        Aggiunto il parametro <code class="parameter">raw_output</code>.
       </td>
      </tr>

      <tr>
       <td>5.1.0</td>
       <td>
        Modificata la funzione per utilizzare lr API streams. Ciò significa che si può
        utlizzare la funzione con i vari warppers, tipo <code class="literal">sha1_file(&#039;http://example.com/..&#039;)</code>
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.sha1-file-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.sha1.php" class="function" rel="rdfs-seeAlso">sha1()</a> - Calcola l'hash sha1 di una stringa</span></li>
    <li><span class="function"><a href="function.md5-file.php" class="function" rel="rdfs-seeAlso">md5_file()</a> - Calcola l'hash md5 del file dato</span></li>
    <li><span class="function"><a href="function.crc32.php" class="function" rel="rdfs-seeAlso">crc32()</a> - Calcola il crc32 polinomiale di una stringa</span></li>
   </ul>
  </p>
 </div>

</div><?php manual_footer($setup); ?>