Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 5492

php-manual-en-7.2.11-1.mga7.noarch.rpm

<!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>Generates a new private key</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.openssl-pkey-get-public.html">openssl_pkey_get_public</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.openssl-private-decrypt.html">openssl_private_decrypt</a></div>
 <div class="up"><a href="ref.openssl.html">OpenSSL Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.openssl-pkey-new" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openssl_pkey_new</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">openssl_pkey_new</span> &mdash; <span class="dc-title">Generates a new private key </span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.openssl-pkey-new-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">resource</span> <span class="methodname"><strong>openssl_pkey_new</strong></span>
    ([ <span class="methodparam"><span class="type">array</span> <code class="parameter">$configargs</code></span>
  ] )</div>

  <p class="para rdfs-comment">
   <span class="function"><strong>openssl_pkey_new()</strong></span> generates a new private and public
   key pair.  The public component of the key can be obtained using
   <span class="function"><a href="function.openssl-pkey-get-public.html" class="function">openssl_pkey_get_public()</a></span>.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
 <span class="simpara">
  You need to have a valid <var class="filename">openssl.cnf</var> installed for
  this function to operate correctly.
  See the notes under <a href="openssl.installation.html" class="link">the installation
  section</a> for more information.
 </span>
</p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.openssl-pkey-new-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">configargs</code></dt>

     <dd>

      <p class="para">
       You can finetune the key generation (such as specifying the number of
       bits) using <code class="parameter">configargs</code>.  See
       <span class="function"><a href="function.openssl-csr-new.html" class="function">openssl_csr_new()</a></span> for more information about
       <code class="parameter">configargs</code>.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.openssl-pkey-new-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns a resource identifier for the pkey on success, or <strong><code>FALSE</code></strong> on
   error.
  </p>
 </div>


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

    </thead>

    <tbody class="tbody">
     <tr>
      <td>7.1.0</td>
      <td>The <code class="parameter">curve_name</code> configarg was added to make it possible to create EC keys.</td>
     </tr>

    </tbody>
   
  </table>

 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.openssl-pkey-get-public.html">openssl_pkey_get_public</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.openssl-private-decrypt.html">openssl_private_decrypt</a></div>
 <div class="up"><a href="ref.openssl.html">OpenSSL Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>