<?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 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.openssl-cipher-key-length.php',
    1 => 'openssl_cipher_key_length',
    2 => 'Gets the cipher key length',
  ),
  'up' => 
  array (
    0 => 'ref.openssl.php',
    1 => 'OpenSSL 函数',
  ),
  'prev' => 
  array (
    0 => 'function.openssl-cipher-iv-length.php',
    1 => 'openssl_cipher_iv_length',
  ),
  'next' => 
  array (
    0 => 'function.openssl-cms-decrypt.php',
    1 => 'openssl_cms_decrypt',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/openssl/functions/openssl-cipher-key-length.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.openssl-cipher-key-length" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openssl_cipher_key_length</h1>
  <p class="verinfo">(PHP 8 &gt;= 8.2.0)</p><p class="refpurpose"><span class="refname">openssl_cipher_key_length</span> &mdash; <span class="dc-title">Gets the cipher key length</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.openssl-cipher-key-length-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>openssl_cipher_key_length</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$cipher_algo</code></span>): <span class="type"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Gets the cipher key length.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.openssl-cipher-key-length-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt><code class="parameter">cipher_algo</code></dt>
    <dd>
     <p class="para">
      The cipher method, see <span class="function"><a href="function.openssl-get-cipher-methods.php" class="function">openssl_get_cipher_methods()</a></span> for a list of potential values.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.openssl-cipher-key-length-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns the cipher length on success,  或者在失败时返回 <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.openssl-cipher-key-length-errors">
  <h3 class="title">错误／异常</h3>
  <p class="para">
   Emits an <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> level error when the cipher algorithm
   is unknown.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.openssl-cipher-key-length-examples">
  <h3 class="title">示例</h3>
  <div class="example" id="example-1">
   <p><strong>示例 #1 <span class="function"><strong>openssl_cipher_key_length()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$method </span><span style="color: #007700">= </span><span style="color: #DD0000">'AES-128-CBC'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">openssl_cipher_key_length</span><span style="color: #007700">(</span><span style="color: #0000BB">$method</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>以上示例的输出类似于：</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">int(16)</pre>
</div>
   </div>
  </div>
 </div>


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