uTools-Manuals/docs/php/openssl_cipher_iv_length.html
2019-04-08 23:22:26 +08:00

86 lines
3.3 KiB
HTML

<!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>获取密码iv长度</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.openssl-cipher-iv-length" class="refentry">
<div class="refnamediv">
<h1 class="refname">openssl_cipher_iv_length</h1>
<p class="verinfo">(PHP 5 &gt;= 5.3.3, PHP 7)</p><p class="refpurpose"><span class="refname">openssl_cipher_iv_length</span> &mdash; <span class="dc-title">获取密码iv长度</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.openssl-cipher-iv-length-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>openssl_cipher_iv_length</strong></span>
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$method</code></span>
) : <span class="type">int</span></div>
<p class="para rdfs-comment">
获取密码初始化向量(iv)长度。
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.openssl-cipher-iv-length-parameters">
<h3 class="title">参数</h3>
<dl>
<dt>
<code class="parameter">method</code></dt>
<dd>
<p class="para">
密码的方法,更多值查看 <span class="function"><a href="openssl_get_cipher_methods.html" class="function">openssl_get_cipher_methods()</a></span> 函数。
</p>
</dd>
</dl>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.openssl-cipher-iv-length-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
成功,返回密码长度, 失败返回 <strong><code>FALSE</code></strong> .
</p>
</div>
<div class="refsect1 errors" id="refsect1-function.openssl-cipher-iv-length-errors">
<h3 class="title">错误/异常</h3>
<p class="para">
当密码方法未知时,抛出一个<strong><code>E_WARNING</code></strong> 级的错误。
</p>
</div>
<div class="refsect1 examples" id="refsect1-function.openssl-cipher-iv-length-examples">
<h3 class="title">范例</h3>
<div class="example" id="example-922">
<p><strong>Example #1 <span class="function"><strong>openssl_cipher_iv_length()</strong></span> 范例</strong></p>
<div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$method&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'AES-128-CBC'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$ivlen&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">openssl_cipher_iv_length</span><span style="color: #007700">(</span><span style="color: #0000BB">$method</span><span style="color: #007700">);<br /><br />echo&nbsp;</span><span style="color: #0000BB">$ivlen</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
</div>
<div class="example-contents"><p>以上例程的输出类似于:</p></div>
<div class="example-contents screen">
<div class="cdata"><pre>
16
</pre></div>
</div>
</div>
</div>
</div></div></div></body></html>