public abstract class AlgorithmParametersSpi extends Object
AlgorithmParameters类,它用于管理算法参数。
该类中的所有抽象方法必须由希望为特定算法提供参数管理的每个加密服务提供商实现。
AlgorithmParameters , AlgorithmParameterSpec , DSAParameterSpec
| Constructor and Description |
|---|
AlgorithmParametersSpi() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract byte[] |
engineGetEncoded()
返回其主要编码格式的参数。
|
protected abstract byte[] |
engineGetEncoded(String format)
返回以指定格式编码的参数。
|
protected abstract <T extends AlgorithmParameterSpec> |
engineGetParameterSpec(类<T> paramSpec)
返回此参数对象的(透明)规范。
|
protected abstract void |
engineInit(AlgorithmParameterSpec paramSpec)
使用paramSpec中
paramSpec的参数初始化此参数对象。
|
protected abstract void |
engineInit(byte[] params)
导入指定的参数,并根据参数的主要解码格式进行解码。
|
protected abstract void |
engineInit(byte[] params, String format)
从
params ,并根据指定的解码格式进行解码。
|
protected abstract String |
engineToString()
返回描述参数的格式化字符串。
|
protected abstract void engineInit(AlgorithmParameterSpec paramSpec) throws InvalidParameterSpecException
paramSpec的参数初始化此参数对象。
paramSpec - 参数说明。
InvalidParameterSpecException - 如果给定的参数规范不适用于此参数对象的初始化。
protected abstract void engineInit(byte[] params)
throws IOException
params - 编码参数。
IOException - 解码错误
protected abstract void engineInit(byte[] params,
String format)
throws IOException
params ,并根据指定的解码格式进行解码。
如果format为空,则使用参数的主要解码格式。
主要解码格式为ASN.1,如果存在这些参数的ASN.1规范。
params - 编码参数。
format - 解码格式的名称。
IOException - 解码错误
protected abstract <T extends AlgorithmParameterSpec> T engineGetParameterSpec(类<T> paramSpec) throws InvalidParameterSpecException
paramSpec标识了应在其中返回参数的规范类。
例如,它可以是DSAParameterSpec.class ,以表明在DSAParameterSpec类的实例中应该返回DSAParameterSpec 。
T - 要返回的参数规范的类型
paramSpec - 应该返回
paramSpec的规范类。
InvalidParameterSpecException - 如果请求的参数规范不适合此参数对象。
protected abstract byte[] engineGetEncoded()
throws IOException
IOException - 编码错误。
protected abstract byte[] engineGetEncoded(String format) throws IOException
format为null,则使用参数的主编码格式。
如果存在这些参数的ASN.1规范,则主编码格式为ASN.1。
format - 编码格式的名称。
IOException - 关于编码错误。
protected abstract String engineToString()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.