<?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 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.openssl-pkey-get-details.php',
    1 => 'openssl_pkey_get_details',
    2 => 'Liefert ein Array mit Schl&uuml;ssel-Details',
  ),
  'up' => 
  array (
    0 => 'ref.openssl.php',
    1 => 'OpenSSL-Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.openssl-pkey-free.php',
    1 => 'openssl_pkey_free',
  ),
  'next' => 
  array (
    0 => 'function.openssl-pkey-get-private.php',
    1 => 'openssl_pkey_get_private',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/openssl/functions/openssl-pkey-get-details.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-details" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openssl_pkey_get_details</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">openssl_pkey_get_details</span> &mdash; <span class="dc-title">Liefert ein Array mit Schlüssel-Details</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.openssl-pkey-get-details-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>openssl_pkey_get_details</strong></span>(<span class="methodparam"><span class="type"><a href="class.opensslasymmetrickey.php" class="type OpenSSLAsymmetricKey">OpenSSLAsymmetricKey</a></span> <code class="parameter">$key</code></span>): <span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Diese Funktion gibt die Schlüssel-Details zurück (Bits, Schlüssel, Typ).
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.openssl-pkey-get-details-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">key</code></dt>
     <dd>
      <p class="para">
       Die Ressource, die den Schlüssel enthält.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.openssl-pkey-get-details-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt bei Erfolg ein Array mit den Schlüssel-Details zurück oder <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> im
   Fehlerfall. Das zurückgegebene Array enthält die Indizes
   <code class="literal">bits</code> (Anzahl der Bits), <code class="literal">key</code> (der
   öffentliche Schlüssel als Zeichenkette) und <code class="literal">type</code> (Typ
   des Schlüssels, eine der Konstanten
   <strong><code><a href="openssl.key-types.php#constant.openssl-keytype-rsa">OPENSSL_KEYTYPE_RSA</a></code></strong>,
   <strong><code><a href="openssl.key-types.php#constant.openssl-keytype-dsa">OPENSSL_KEYTYPE_DSA</a></code></strong>,
   <strong><code><a href="openssl.key-types.php#constant.openssl-keytype-dh">OPENSSL_KEYTYPE_DH</a></code></strong>,
   <strong><code><a href="openssl.key-types.php#constant.openssl-keytype-ec">OPENSSL_KEYTYPE_EC</a></code></strong>,
   <strong><code><a href="openssl.key-types.php#constant.openssl-keytype-x25519">OPENSSL_KEYTYPE_X25519</a></code></strong>,
   <strong><code><a href="openssl.key-types.php#constant.openssl-keytype-ed25519">OPENSSL_KEYTYPE_ED25519</a></code></strong>,
   <strong><code><a href="openssl.key-types.php#constant.openssl-keytype-x448">OPENSSL_KEYTYPE_X448</a></code></strong>,
   <strong><code><a href="openssl.key-types.php#constant.openssl-keytype-ed448">OPENSSL_KEYTYPE_ED448</a></code></strong>
   oder -1 für einen unbekannten Typ).
  </p>
  <p class="para">
   In Abhängigkeit vom verwendeten Schlüssel-Typ können zusätzliche Details
   zurückgegeben werden. Es ist zu beachten, dass manche Elemente u.U. nicht
   immer verfügbar sind.
  </p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <strong><code><a href="openssl.key-types.php#constant.openssl-keytype-rsa">OPENSSL_KEYTYPE_RSA</a></code></strong>: ein zusätzlicher
     Array-Schlüssel mit dem Namen <code class="literal">&quot;rsa&quot;</code>, der die
     Schlüssel-Daten enthält, wird zurückgegeben.
    </span>
    <table class="doctable informaltable">
     
      <thead>
       <tr>
        <th>Schlüssel</th>
        <th>Beschreibung</th>
       </tr>

      </thead>

      <tbody class="tbody">
       <tr>
        <td><code class="literal">&quot;n&quot;</code></td>
        <td>Modul</td>
       </tr>

       <tr>
        <td><code class="literal">&quot;e&quot;</code></td>
        <td>Öffentlicher Exponent</td>
       </tr>

       <tr>
        <td><code class="literal">&quot;d&quot;</code></td>
        <td>Privater Exponent</td>
       </tr>

       <tr>
        <td><code class="literal">&quot;p&quot;</code></td>
        <td>Primzahl 1</td>
       </tr>

       <tr>
        <td><code class="literal">&quot;q&quot;</code></td>
        <td>Primzahl 2</td>
       </tr>

       <tr>
        <td><code class="literal">&quot;dmp1&quot;</code></td>
        <td>Exponent 1, d mod (p-1)</td>
       </tr>

       <tr>
        <td><code class="literal">&quot;dmq1&quot;</code></td>
        <td>Exponent 2, d mod (q-1)</td>
       </tr>

       <tr>
        <td><code class="literal">&quot;iqmp&quot;</code></td>
        <td>Koeffizient, (Kehrwert von q) mod p</td>
       </tr>

      </tbody>
     
    </table>

   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code><a href="openssl.key-types.php#constant.openssl-keytype-dsa">OPENSSL_KEYTYPE_DSA</a></code></strong>: ein zusätzlicher
     Array-Schlüssel mit dem Namen <code class="literal">&quot;dsa&quot;</code>, der die
     Schlüssel-Daten enthält, wird zurückgegeben.
    </span>
    <table class="doctable informaltable">
     
      <thead>
       <tr>
        <th>Schlüssel</th>
        <th>Beschreibung</th>
       </tr>

      </thead>

      <tbody class="tbody">
       <tr>
        <td><code class="literal">&quot;p&quot;</code></td>
        <td>Primzahl (öffentlich)</td>
       </tr>

       <tr>
        <td><code class="literal">&quot;q&quot;</code></td>
        <td>160-bit Unterprimzahl, q | p-1 (öffentlich)</td>
       </tr>

       <tr>
        <td><code class="literal">&quot;g&quot;</code></td>
        <td>Generator der Untergruppe (öffentlich)</td>
       </tr>

       <tr>
        <td><code class="literal">&quot;priv_key&quot;</code></td>
        <td>privater Schlüssel</td>
       </tr>

       <tr>
        <td><code class="literal">&quot;pub_key&quot;</code></td>
        <td>öffentlicher Schlüssel y = g^x</td>
       </tr>

      </tbody>
     
    </table>

   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code><a href="openssl.key-types.php#constant.openssl-keytype-dh">OPENSSL_KEYTYPE_DH</a></code></strong>: ein zusätzlicher Array-Schlüssel
     mit dem Namen <code class="literal">&quot;dh&quot;</code>, der die Schlüssel-Daten enthält,
     wird zurückgegeben.
    </span>
    <table class="doctable informaltable">
     
      <thead>
       <tr>
        <th>Schlüssel</th>
        <th>Beschreibung</th>
       </tr>

      </thead>

      <tbody class="tbody">
       <tr>
        <td><code class="literal">&quot;p&quot;</code></td>
        <td>Primzahl (geteilt)</td>
       </tr>

       <tr>
        <td><code class="literal">&quot;g&quot;</code></td>
        <td>Generator von Z_p (geteilt)</td>
       </tr>

       <tr>
        <td><code class="literal">&quot;priv_key&quot;</code></td>
        <td>privater DH-Wert x</td>
       </tr>

       <tr>
        <td><code class="literal">&quot;pub_key&quot;</code></td>
        <td>öffentlicher DH-Wert g^x</td>
       </tr>

      </tbody>
     
    </table>

   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code><a href="openssl.key-types.php#constant.openssl-keytype-x25519">OPENSSL_KEYTYPE_X25519</a></code></strong>,
     <strong><code><a href="openssl.key-types.php#constant.openssl-keytype-ed25519">OPENSSL_KEYTYPE_ED25519</a></code></strong>,
     <strong><code><a href="openssl.key-types.php#constant.openssl-keytype-x448">OPENSSL_KEYTYPE_X448</a></code></strong>
     oder <strong><code><a href="openssl.key-types.php#constant.openssl-keytype-ed448">OPENSSL_KEYTYPE_ED448</a></code></strong>:
     ein zusätzlicher Array-Schlüssel mit dem Namen
     <code class="literal">&quot;x25519&quot;</code>,
     <code class="literal">&quot;ed25519&quot;</code>,
     <code class="literal">&quot;x448&quot;</code>,
     bzw. <code class="literal">&quot;ed448&quot;</code>, der die Schlüssel-Daten enthält,
     wird zurückgegeben.
    </span>
    <table class="doctable informaltable">
     
      <thead>
       <tr>
        <th>Key</th>
        <th>Beschreibung</th>
       </tr>

      </thead>

      <tbody class="tbody">
       <tr>
        <td><code class="literal">&quot;priv_key&quot;</code></td>
        <td>privater Schlüssel</td>
       </tr>

       <tr>
        <td><code class="literal">&quot;pub_key&quot;</code></td>
        <td>öffentlicher Schlüssel</td>
       </tr>

      </tbody>
     
    </table>

   </li>
  </ul>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.openssl-pkey-get-details-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.4.0</td>
      <td>
       Unterstützung für Schlüssel, die auf Curve25519 und Curve448 basieren,
       hinzugefügt.
       Insbesondere wurden die Felder <code class="literal">x25519</code>,
       <code class="literal">ed25519</code>, <code class="literal">x448</code> und
       <code class="literal">ed448</code> eingeführt.
      </td>
     </tr>

     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">key</code> akzeptiert nun eine
       <span class="classname"><a href="class.opensslasymmetrickey.php" class="classname">OpenSSLAsymmetricKey</a></span>-Instanz; vorher wurde eine
       <a href="language.types.resource.php" class="link">Ressource</a> vom Typ <code class="literal">OpenSSL-Schlüssel</code> akzeptiert.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


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