mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 05:26:57 +08:00
158 lines
6.1 KiB
HTML
158 lines
6.1 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>获取可用的摘要算法</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.openssl-get-md-methods" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">openssl_get_md_methods</h1>
|
|
<p class="verinfo">(PHP 5 >= 5.3.0, PHP 7)</p><p class="refpurpose"><span class="refname">openssl_get_md_methods</span> — <span class="dc-title">获取可用的摘要算法</span></p>
|
|
|
|
</div>
|
|
|
|
<div class="refsect1 description" id="refsect1-function.openssl-get-md-methods-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>openssl_get_md_methods</strong></span>
|
|
([ <span class="methodparam"><span class="type">bool</span> <code class="parameter">$aliases</code><span class="initializer"> = false</span></span>
|
|
] ) : <span class="type">array</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
获取可用的摘要算法列表
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.openssl-get-md-methods-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">aliases</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
设置为 <strong><code>TRUE</code></strong> 时,返回的<span class="type"><a href="language.types.array.html" class="type array">array</a></span>中将会包含摘要的别名.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.openssl-get-md-methods-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
含有可用摘要算法的<span class="type"><span class="type 数组">数组</span></span>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 examples" id="refsect1-function.openssl-get-md-methods-examples">
|
|
<h3 class="title">范例</h3>
|
|
<p class="para">
|
|
<div class="example" id="example-936">
|
|
<p><strong>Example #1 <span class="function"><strong>openssl_get_md_methods()</strong></span> 范例:</strong></p>
|
|
<div class="example-contents"><p>
|
|
显示了可用的摘要,以及哪些别名可能是可用的。
|
|
</p></div>
|
|
<div class="example-contents">
|
|
<div class="phpcode"><pre><span style="color: #000000">
|
|
<span style="color: #0000BB"><?php<br />$digests </span><span style="color: #007700">= </span><span style="color: #0000BB">openssl_get_md_methods</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$digests_and_aliases </span><span style="color: #007700">= </span><span style="color: #0000BB">openssl_get_md_methods</span><span style="color: #007700">(</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$digest_aliases </span><span style="color: #007700">= </span><span style="color: #0000BB">array_diff</span><span style="color: #007700">(</span><span style="color: #0000BB">$digests_and_aliases</span><span style="color: #007700">, </span><span style="color: #0000BB">$digests</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$digests</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$digest_aliases</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?></span>
|
|
</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
<div class="example-contents"><p>以上例程的输出类似于:</p></div>
|
|
<div class="example-contents screen">
|
|
<div class="cdata"><pre>
|
|
Array
|
|
(
|
|
[0] => DSA
|
|
[1] => DSA-SHA
|
|
[2] => MD2
|
|
[3] => MD4
|
|
[4] => MD5
|
|
[5] => RIPEMD160
|
|
[6] => SHA
|
|
[7] => SHA1
|
|
[8] => SHA224
|
|
[9] => SHA256
|
|
[10] => SHA384
|
|
[11] => SHA512
|
|
[12] => dsaEncryption
|
|
[13] => dsaWithSHA
|
|
[14] => ecdsa-with-SHA1
|
|
[15] => md2
|
|
[16] => md4
|
|
[17] => md5
|
|
[18] => ripemd160
|
|
[19] => sha
|
|
[20] => sha1
|
|
[21] => sha224
|
|
[22] => sha256
|
|
[23] => sha384
|
|
[24] => sha512
|
|
)
|
|
Array
|
|
(
|
|
[2] => DSA-SHA1
|
|
[3] => DSA-SHA1-old
|
|
[4] => DSS1
|
|
[9] => RSA-MD2
|
|
[10] => RSA-MD4
|
|
[11] => RSA-MD5
|
|
[12] => RSA-RIPEMD160
|
|
[13] => RSA-SHA
|
|
[14] => RSA-SHA1
|
|
[15] => RSA-SHA1-2
|
|
[16] => RSA-SHA224
|
|
[17] => RSA-SHA256
|
|
[18] => RSA-SHA384
|
|
[19] => RSA-SHA512
|
|
[28] => dsaWithSHA1
|
|
[29] => dss1
|
|
[32] => md2WithRSAEncryption
|
|
[34] => md4WithRSAEncryption
|
|
[36] => md5WithRSAEncryption
|
|
[37] => ripemd
|
|
[39] => ripemd160WithRSA
|
|
[40] => rmd160
|
|
[43] => sha1WithRSAEncryption
|
|
[45] => sha224WithRSAEncryption
|
|
[47] => sha256WithRSAEncryption
|
|
[49] => sha384WithRSAEncryption
|
|
[51] => sha512WithRSAEncryption
|
|
[52] => shaWithRSAEncryption
|
|
[53] => ssl2-md5
|
|
[54] => ssl3-md5
|
|
[55] => ssl3-sha1
|
|
)
|
|
</pre></div>
|
|
</div>
|
|
</div>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 seealso" id="refsect1-function.openssl-get-md-methods-seealso">
|
|
<h3 class="title">参见</h3>
|
|
<p class="para">
|
|
<ul class="simplelist">
|
|
<li class="member"><span class="function"><a href="openssl_digest.html" class="function" rel="rdfs-seeAlso">openssl_digest()</a> - 计算摘要</span></li>
|
|
<li class="member"><span class="function"><a href="openssl_get_cipher_methods.html" class="function" rel="rdfs-seeAlso">openssl_get_cipher_methods()</a> - 获取可用的加密算法</span></li>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
</div></div></div></body></html> |