<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.openssl.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'function.openssl-x509-fingerprint.php',
    1 => 'openssl_x509_fingerprint',
    2 => 'Calcule l\'empreinte, ou le digest d\'un certificat X.509 donn&eacute;',
  ),
  'up' => 
  array (
    0 => 'ref.openssl.php',
    1 => 'Fonctions OpenSSL',
  ),
  'prev' => 
  array (
    0 => 'function.openssl-x509-export-to-file.php',
    1 => 'openssl_x509_export_to_file',
  ),
  'next' => 
  array (
    0 => 'function.openssl-x509-free.php',
    1 => 'openssl_x509_free',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/openssl/functions/openssl-x509-fingerprint.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.openssl-x509-fingerprint" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openssl_x509_fingerprint</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.6.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">openssl_x509_fingerprint</span> &mdash; <span class="dc-title">Calcule l&#039;empreinte, ou le digest d&#039;un certificat X.509 donné</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.openssl-x509-fingerprint-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>openssl_x509_fingerprint</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="class.opensslcertificate.php" class="type OpenSSLCertificate">OpenSSLCertificate</a></span>|<span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$certificate</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$digest_algo</code><span class="initializer"> = &quot;sha1&quot;</span></span>, <span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$binary</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong></span></span>): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   La fonction <span class="function"><strong>openssl_x509_fingerprint()</strong></span> retourne le digest
   d&#039;un certificat <code class="parameter">certificate</code> sous la forme d&#039;une <a href="language.types.string.php" class="link">chaîne de caractères</a>.
  </p>
 </div>

 
 <div class="refsect1 parameters" id="refsect1-function.openssl-x509-fingerprint-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   <dl>
    
<dt><code class="parameter">certificate</code></dt>
<dd>
    <p class="para">
        Voir les <a href="openssl.certparams.php" class="link">paramètres clés/Certificats</a>
        pour une liste de valeurs valides.
    </p>
</dd>

    
     <dt><code class="parameter">digest_algo</code></dt>
     <dd>
      <p class="para">
       La méthode de digest ou l&#039;algorithme de hachage à utiliser, par exemple
       &quot;sha256&quot;, l&#039;un de <span class="function"><a href="function.openssl-get-md-methods.php" class="function">openssl_get_md_methods()</a></span>.
      </p>
     </dd>
    
    
     <dt><code class="parameter">binary</code></dt>
     <dd>
      <p class="para">
       Lorsque défini à <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>, affiche les données brutes binaires.
       <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> affiche en hexits minuscules.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-function.openssl-x509-fingerprint-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Retourne une <a href="language.types.string.php" class="link">chaîne de caractères</a> contenant l&#039;empreinte calculée du certificat sous la forme
   d&#039;hexits minuscules sauf si <code class="parameter">binary</code> est défini à <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>
   dans ce cas la représentation brute binaire du message digest est retournée.
  </p>
  <p class="para">
   Retourne <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> en cas d&#039;échec.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.openssl-x509-fingerprint-changelog">
  <h3 class="title">Historique</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">certificate</code> accepte désormais une instance de
       <span class="classname"><a href="class.opensslcertificate.php" class="classname">OpenSSLCertificate</a></span> ;
       auparavant, une <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> de type <code class="literal">OpenSSL X.509</code> était acceptée.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>

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