mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 05:26:57 +08:00
80 lines
2.8 KiB
HTML
80 lines
2.8 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-pkey-get-private" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">openssl_pkey_get_private</h1>
|
|
<p class="verinfo">(PHP 4 >= 4.2.0, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">openssl_pkey_get_private</span> — <span class="dc-title">获取私钥</span></p>
|
|
|
|
</div>
|
|
|
|
<div class="refsect1 description" id="refsect1-function.openssl-pkey-get-private-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>openssl_pkey_get_private</strong></span>
|
|
( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$key</code></span>
|
|
[, <span class="methodparam"><span class="type">string</span> <code class="parameter">$passphrase</code><span class="initializer"> = ""</span></span>
|
|
] ) : <span class="type">resource</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
<span class="function"><a href="openssl_get_privatekey.html" class="function">openssl_get_privatekey()</a></span> 解析
|
|
<code class="parameter">key</code> 供其他函数使用。
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.openssl-pkey-get-private-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">key</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
<code class="parameter">key</code> 可以是如下密钥之一:
|
|
<ol type="1">
|
|
<li class="listitem"><span class="simpara">如下格式的字符串
|
|
<var class="filename">file://path/to/file.pem</var>。该文件必须包含 PEM 编码的证书或者私钥 (可能都包含了).
|
|
</span>
|
|
</li>
|
|
<li class="listitem"><span class="simpara">一个PEM格式的私钥。</span></li>
|
|
</ol>
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">passphrase</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
如果指定的密钥已被加密了(受密码保护),可选参数 <code class="parameter">passphrase</code> 是必须要的。
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.openssl-pkey-get-private-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
成功,返回真实的密钥资源标识符,失败,返回 <strong><code>FALSE</code></strong> .
|
|
</p>
|
|
</div>
|
|
|
|
|
|
</div></div></div></body></html> |