<?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-pkey-get-private.php',
    1 => 'openssl_pkey_get_private',
    2 => 'Lit une cl&eacute; priv&eacute;e',
  ),
  'up' => 
  array (
    0 => 'ref.openssl.php',
    1 => 'Fonctions OpenSSL',
  ),
  'prev' => 
  array (
    0 => 'function.openssl-pkey-get-details.php',
    1 => 'openssl_pkey_get_details',
  ),
  'next' => 
  array (
    0 => 'function.openssl-pkey-get-public.php',
    1 => 'openssl_pkey_get_public',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/openssl/functions/openssl-pkey-get-private.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.openssl-pkey-get-private" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openssl_pkey_get_private</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">openssl_pkey_get_private</span> &mdash; <span class="dc-title">Lit une clé privée</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.openssl-pkey-get-private-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>openssl_pkey_get_private</strong></span>(<span class="methodparam"><span class="attribute"><a href="class.sensitiveparameter.php">#[\SensitiveParameter]</a> </span><span class="type"><span class="type"><a href="class.opensslasymmetrickey.php" class="type OpenSSLAsymmetricKey">OpenSSLAsymmetricKey</a></span>|<span class="type"><a href="class.opensslcertificate.php" class="type OpenSSLCertificate">OpenSSLCertificate</a></span>|<span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$private_key</code></span>, <span class="methodparam"><span class="attribute"><a href="class.sensitiveparameter.php">#[\SensitiveParameter]</a> </span><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$passphrase</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><span class="type"><a href="class.opensslasymmetrickey.php" class="type OpenSSLAsymmetricKey">OpenSSLAsymmetricKey</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>openssl_pkey_get_private()</strong></span> analyse la clé
   <code class="parameter">private_key</code> et la prépare pour être utilisée
   par d&#039;autres fonctions.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.openssl-pkey-get-private-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">private_key</code></dt>
     <dd>
      <p class="para">
       <code class="parameter">private_key</code> peut être l&#039;une des valeurs suivantes :
       <ol type="1">
        <li class="listitem">
         <span class="simpara">
          une chaîne au format <var class="filename">file://path/to/file.pem</var>.
          Le fichier ainsi désigné doit contenir une clé privée ou
          un certificat au format <abbr title="Privacy-Enhanced Mail">PEM</abbr> (éventuellement les deux).
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          Une clé privée au format <abbr title="Privacy-Enhanced Mail">PEM</abbr>.
         </span>
        </li>
       </ol>
      </p>
     </dd>
    
    
     <dt><code class="parameter">passphrase</code></dt>
     <dd>
      <p class="para">
       Le paramètre optionnel <code class="parameter">passphrase</code> doit être utilisé si
       la clé spécifiée est chiffrée (protégée par un mot de passe).
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.openssl-pkey-get-private-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Retourne une instance de <span class="classname"><a href="class.opensslasymmetrickey.php" class="classname">OpenSSLAsymmetricKey</a></span> en cas de succès, ou
   <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> si une erreur survient.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.openssl-pkey-get-private-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>
       En cas de succès, cette fonction retourne désormais une instance de
       <span class="classname"><a href="class.opensslasymmetrickey.php" class="classname">OpenSSLAsymmetricKey</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 key</code> était retournée.
      </td>
     </tr>

     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">private_key</code> accepte désormais une instance de
       <span class="classname"><a href="class.opensslasymmetrickey.php" class="classname">OpenSSLAsymmetricKey</a></span> ou <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 key</code> ou <code class="literal">OpenSSL X.509</code>
       était acceptée.
      </td>
     </tr>

     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">passphrase</code> est désormais nullable.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>

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