uTools-Manuals/docs/java/javax/crypto/ExemptionMechanismSpi.html

324 lines
17 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="header">
<div class="subTitle">
javax.crypto
</div>
<h2 class="title" title="Class ExemptionMechanismSpi">Class ExemptionMechanismSpi</h2>
</div><div class="contentContainer">
<ul class="inheritance">
<li><a href="../../java/lang/Object.html" title="class in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>javax.crypto.ExemptionMechanismSpi</li>
</ul> </li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr/> <br/> <pre>public abstract class <span class="typeNameLabel">ExemptionMechanismSpi</span>
extends <a href="../../java/lang/Object.html" title="class in java.lang">Object</a></pre>
<div class="block">
<span>这个类定义的 <span>SPI</span> <code>ExemptionMechanism</code>类。</span>
<span>该类中的所有抽象方法必须由希望提供特定豁免机制实施的每个加密服务提供商来实现。</span>
</div>
<dl>
<dt>
<span class="simpleTagLabel">从以下版本开始:</span>
</dt>
<dd>
1.4
</dd>
</dl> </li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- --> </a> <h3>构造方法摘要</h3>
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary" summary="Constructor Summary table, listing constructors, and an explanation">
<caption>
<span>构造方法</span>
<span class="tabEnd"> </span>
</caption>
<tbody>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../javax/crypto/ExemptionMechanismSpi.html#ExemptionMechanismSpi--">ExemptionMechanismSpi</a></span>()</code> </td>
</tr>
</tbody>
</table> </li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- --> </a> <h3>方法摘要</h3>
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary" summary="Method Summary table, listing methods, and an explanation">
<caption>
<span class="activeTableTab" id="t0"><span>所有方法</span><span class="tabEnd"> </span></span>
<span class="tableTab" id="t2"><span><a href="javascript:show(2);">接口方法</a></span><span class="tabEnd"> </span></span>
<span class="tableTab" id="t3"><span><a href="javascript:show(4);">抽象方法</a></span><span class="tabEnd"> </span></span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor" id="i0">
<td class="colFirst"><code>protected abstract byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/crypto/ExemptionMechanismSpi.html#engineGenExemptionBlob--">engineGenExemptionBlob</a></span>()</code>
<div class="block">
生成豁免机制密钥blob。
</div> </td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code>protected abstract int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/crypto/ExemptionMechanismSpi.html#engineGenExemptionBlob-byte:A-int-">engineGenExemptionBlob</a></span>(byte[] output, int outputOffset)</code>
<div class="block">
生成豁免机制键blob并将结果存储在
<code>output</code>缓冲区中,从
<code>outputOffset</code>开始。
</div> </td>
</tr>
<tr class="altColor" id="i2">
<td class="colFirst"><code>protected abstract int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/crypto/ExemptionMechanismSpi.html#engineGetOutputSize-int-">engineGetOutputSize</a></span>(int inputLen)</code>
<div class="block">
给定输入长度
<code>inputLen</code> (以字节为单位),返回输出缓冲区需要保存下一个
<a href="../../javax/crypto/ExemptionMechanismSpi.html#engineGenExemptionBlob-byte:A-int-"><code>engineGenExemptionBlob</code></a>操作结果的字节长度。
</div> </td>
</tr>
<tr class="rowColor" id="i3">
<td class="colFirst"><code>protected abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/crypto/ExemptionMechanismSpi.html#engineInit-java.security.Key-">engineInit</a></span>(<a href="../../java/security/Key.html" title="interface in java.security">Key</a> key)</code>
<div class="block">
使用密钥初始化此豁免机制。
</div> </td>
</tr>
<tr class="altColor" id="i4">
<td class="colFirst"><code>protected abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/crypto/ExemptionMechanismSpi.html#engineInit-java.security.Key-java.security.AlgorithmParameters-">engineInit</a></span>(<a href="../../java/security/Key.html" title="interface in java.security">Key</a> key, <a href="../../java/security/AlgorithmParameters.html" title="class in java.security">AlgorithmParameters</a> params)</code>
<div class="block">
使用密钥和一组算法参数初始化此豁免机制。
</div> </td>
</tr>
<tr class="rowColor" id="i5">
<td class="colFirst"><code>protected abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javax/crypto/ExemptionMechanismSpi.html#engineInit-java.security.Key-java.security.spec.AlgorithmParameterSpec-">engineInit</a></span>(<a href="../../java/security/Key.html" title="interface in java.security">Key</a> key, <a href="../../java/security/spec/AlgorithmParameterSpec.html" title="interface in java.security.spec">AlgorithmParameterSpec</a> params)</code>
<div class="block">
使用密钥和一组算法参数初始化此豁免机制。
</div> </td>
</tr>
</tbody>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- --> </a> <h3>Methods inherited from class java.lang.<a href="../../java/lang/Object.html" title="class in java.lang">Object</a></h3> <code><a href="../../java/lang/Object.html#clone--">clone</a>, <a href="../../java/lang/Object.html#equals-java.lang.Object-">equals</a>, <a href="../../java/lang/Object.html#finalize--">finalize</a>, <a href="../../java/lang/Object.html#getClass--">getClass</a>, <a href="../../java/lang/Object.html#hashCode--">hashCode</a>, <a href="../../java/lang/Object.html#notify--">notify</a>, <a href="../../java/lang/Object.html#notifyAll--">notifyAll</a>, <a href="../../java/lang/Object.html#toString--">toString</a>, <a href="../../java/lang/Object.html#wait--">wait</a>, <a href="../../java/lang/Object.html#wait-long-">wait</a>, <a href="../../java/lang/Object.html#wait-long-int-">wait</a></code></li>
</ul> </li>
</ul> </li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- --> </a> <h3>构造方法详细信息</h3> <a name="ExemptionMechanismSpi--">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>ExemptionMechanismSpi</h4> <pre>public ExemptionMechanismSpi()</pre> </li>
</ul> </li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- --> </a> <h3>方法详细信息</h3> <a name="engineGetOutputSize-int-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>engineGetOutputSize</h4> <pre>protected abstract int engineGetOutputSize(int inputLen)</pre>
<div class="block">
<span>给定输入长度<code>inputLen</code> (以字节为单位),返回输出缓冲区需要保存下一个<a href="../../javax/crypto/ExemptionMechanismSpi.html#engineGenExemptionBlob-byte:A-int-"><code>engineGenExemptionBlob</code></a>操作结果的字节长度。</span>
<p> <span>下一个<a href="../../javax/crypto/ExemptionMechanismSpi.html#engineGenExemptionBlob-byte:A-int-"><code>engineGenExemptionBlob</code></a>调用的实际输出长度可能小于此方法返回的长度。</span> </p>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>inputLen</code> - 输入长度(以字节为单位)
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
所需的输出缓冲区大小(以字节为单位)
</dd>
</dl> </li>
</ul> <a name="engineInit-java.security.Key-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>engineInit</h4> <pre>protected abstract void engineInit(<a href="../../java/security/Key.html" title="interface in java.security">Key</a> key)
throws <a href="../../java/security/InvalidKeyException.html" title="class in java.security">InvalidKeyException</a>,
<a href="../../javax/crypto/ExemptionMechanismException.html" title="class in javax.crypto">ExemptionMechanismException</a></pre>
<div class="block">
<span>使用密钥初始化此豁免机制。</span>
<p> <span>如果此豁免机制需要不能从给定的<code>key</code>导出的任何<code>key</code> ,则基础豁免机制实现应该自身生成所需参数(使用提供者特定的默认值);</span> <span>在的情况下算法参数必须由呼叫者指定,一个<code>InvalidKeyException</code>上升。</span> </p>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>key</code> - 这个豁免机制的关键
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../java/security/InvalidKeyException.html" title="class in java.security">InvalidKeyException</a></code> - 如果给定的密钥不适用于此豁免机制。
</dd>
<dd>
<code><a href="../../javax/crypto/ExemptionMechanismException.html" title="class in javax.crypto">ExemptionMechanismException</a></code> - 如果在初始化过程中遇到问题。
</dd>
</dl> </li>
</ul> <a name="engineInit-java.security.Key-java.security.spec.AlgorithmParameterSpec-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>engineInit</h4> <pre>protected abstract void engineInit(<a href="../../java/security/Key.html" title="interface in java.security">Key</a> key,
<a href="../../java/security/spec/AlgorithmParameterSpec.html" title="interface in java.security.spec">AlgorithmParameterSpec</a> params)
throws <a href="../../java/security/InvalidKeyException.html" title="class in java.security">InvalidKeyException</a>,
<a href="../../java/security/InvalidAlgorithmParameterException.html" title="class in java.security">InvalidAlgorithmParameterException</a>,
<a href="../../javax/crypto/ExemptionMechanismException.html" title="class in javax.crypto">ExemptionMechanismException</a></pre>
<div class="block">
<span>使用密钥和一组算法参数初始化此豁免机制。</span>
<p> <span>如果此豁免机制需要任何算法参数,并且<code>params</code>为null则基础豁免机制实现应该自身生成所需参数使用提供者特定的默认值;</span> <span>在的情况下算法参数必须由呼叫者指定,一个<code>InvalidAlgorithmParameterException</code>上升。</span> </p>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>key</code> - 这个豁免机制的关键
</dd>
<dd>
<code>params</code> - 算法参数
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../java/security/InvalidKeyException.html" title="class in java.security">InvalidKeyException</a></code> - 如果给定的密钥不适用于此豁免机制。
</dd>
<dd>
<code><a href="../../java/security/InvalidAlgorithmParameterException.html" title="class in java.security">InvalidAlgorithmParameterException</a></code> - 如果给定的算法参数不适用于此豁免机制。
</dd>
<dd>
<code><a href="../../javax/crypto/ExemptionMechanismException.html" title="class in javax.crypto">ExemptionMechanismException</a></code> - 如果在初始化过程中遇到问题。
</dd>
</dl> </li>
</ul> <a name="engineInit-java.security.Key-java.security.AlgorithmParameters-">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>engineInit</h4> <pre>protected abstract void engineInit(<a href="../../java/security/Key.html" title="interface in java.security">Key</a> key,
<a href="../../java/security/AlgorithmParameters.html" title="class in java.security">AlgorithmParameters</a> params)
throws <a href="../../java/security/InvalidKeyException.html" title="class in java.security">InvalidKeyException</a>,
<a href="../../java/security/InvalidAlgorithmParameterException.html" title="class in java.security">InvalidAlgorithmParameterException</a>,
<a href="../../javax/crypto/ExemptionMechanismException.html" title="class in javax.crypto">ExemptionMechanismException</a></pre>
<div class="block">
<span>使用密钥和一组算法参数初始化此豁免机制。</span>
<p> <span>如果此豁免机制需要任何算法参数,并且<code>params</code>为空,则基础豁免机制实现应该自身生成所需参数(使用提供者特定的默认值);</span> <span>在的情况下算法参数必须由呼叫者指定,一个<code>InvalidAlgorithmParameterException</code>上升。</span> </p>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>key</code> - 这个豁免机制的关键
</dd>
<dd>
<code>params</code> - 算法参数
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../java/security/InvalidKeyException.html" title="class in java.security">InvalidKeyException</a></code> - 如果给定的密钥不适用于此豁免机制。
</dd>
<dd>
<code><a href="../../java/security/InvalidAlgorithmParameterException.html" title="class in java.security">InvalidAlgorithmParameterException</a></code> - 如果给定的算法参数不适用于此豁免机制。
</dd>
<dd>
<code><a href="../../javax/crypto/ExemptionMechanismException.html" title="class in javax.crypto">ExemptionMechanismException</a></code> - 如果在初始化过程中遇到问题。
</dd>
</dl> </li>
</ul> <a name="engineGenExemptionBlob--">
<!-- --> </a>
<ul class="blockList">
<li class="blockList"> <h4>engineGenExemptionBlob</h4> <pre>protected abstract byte[] engineGenExemptionBlob()
throws <a href="../../javax/crypto/ExemptionMechanismException.html" title="class in javax.crypto">ExemptionMechanismException</a></pre>
<div class="block">
生成豁免机制密钥blob。
</div>
<dl>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
具有结果键blob的新缓冲区。
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../javax/crypto/ExemptionMechanismException.html" title="class in javax.crypto">ExemptionMechanismException</a></code> - 如果在生成过程中遇到问题。
</dd>
</dl> </li>
</ul> <a name="engineGenExemptionBlob-byte:A-int-">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>engineGenExemptionBlob</h4> <pre>protected abstract int engineGenExemptionBlob(byte[] output,
int outputOffset)
throws <a href="../../javax/crypto/ShortBufferException.html" title="class in javax.crypto">ShortBufferException</a>,
<a href="../../javax/crypto/ExemptionMechanismException.html" title="class in javax.crypto">ExemptionMechanismException</a></pre>
<div class="block">
<span>生成豁免机制键blob并将结果存储在<code>output</code>缓冲区中,从<code>outputOffset</code>开始。</span>
<p> <span>如果<code>output</code>缓冲区太小而不能保存结果,则会抛出一个<code>ShortBufferException</code></span> <span>在这种情况下,使用较大的输出缓冲区重复此呼叫。</span> <span>使用<a href="../../javax/crypto/ExemptionMechanismSpi.html#engineGetOutputSize-int-"><code>engineGetOutputSize</code></a>来确定输出缓冲区应该有多大。</span> </p>
</div>
<dl>
<dt>
<span class="paramLabel">参数</span>
</dt>
<dd>
<code>output</code> - 结果的缓冲区
</dd>
<dd>
<code>outputOffset</code> - 存储结果的
<code>output</code>中的偏移量
</dd>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
存储在
<code>output</code>中的字节数
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../javax/crypto/ShortBufferException.html" title="class in javax.crypto">ShortBufferException</a></code> - 如果给定的输出缓冲区太小,不能保存结果。
</dd>
<dd>
<code><a href="../../javax/crypto/ExemptionMechanismException.html" title="class in javax.crypto">ExemptionMechanismException</a></code> - 如果在生成过程中遇到问题。
</dd>
</dl> </li>
</ul> </li>
</ul> </li>
</ul>
</div>
</div>