public class PSSParameterSpec extends Object implements AlgorithmParameterSpec
它在# ASN.1 PKCS 1标准1定义如下:
rsassa PSS参数::=序列{哈希算法[ 0 ] OAEP pssdigestalgorithms默认SHA1,maskgenalgorithm [ 1 ] pkcs1mgfalgorithms默认mgf1sha1,saltlength [ 2 ]整数,默认为20,trailerfield [ 3 ]整数,默认为1}哪里
论文pssdigestalgorithms algorithm-identifier::= {{零} | OID id-sha1参数{零} | OID id-sha224参数{零} | OID id-sha256参数{零} | OID id-sha384参数{零}老id-sha512参数,…允许未来的扩展}pkcs1mgfalgorithms algorithm-identifier::= {{老id-mgf1参数OAEP pssdigestalgorithms },…允许未来的扩展}
注:本pssparameterspec.default采用如下:消息摘要--“SHA-1”掩码生成函数(MGF)--“株抗体”参数mgf1parameterspec.sha1 saltlength MGF -- 20 -- 1 trailerfield
MGF1ParameterSpec
,
AlgorithmParameterSpec
,
Signature
Modifier and Type | Field and Description |
---|---|
static PSSParameterSpec |
DEFAULT
所有PSS参数设置默认值。
|
Constructor and Description |
---|
PSSParameterSpec(int saltLen)
创建一个使用指定的盐长和其他默认值为1和#定义新
PSSParameterSpec 。
|
PSSParameterSpec(String mdName, String mgfName, AlgorithmParameterSpec mgfSpec, int saltLen, int trailerField)
创建一个新的
PSSParameterSpec 所界定的PKCS 1标准#使用指定的消息摘要,掩码生成功能,掩模生成功能,参数长度和盐,拖车场值。
|
Modifier and Type | Method and Description |
---|---|
String |
getDigestAlgorithm()
返回消息摘要算法名称。
|
String |
getMGFAlgorithm()
返回掩码生成函数算法名。
|
AlgorithmParameterSpec |
getMGFParameters()
返回掩码生成函数的参数。
|
int |
getSaltLength()
返回位的盐长度。
|
int |
getTrailerField()
返回拖车字段的值,即
|
public static final PSSParameterSpec DEFAULT
public PSSParameterSpec(String mdName, String mgfName, AlgorithmParameterSpec mgfSpec, int saltLen, int trailerField)
PSSParameterSpec
所界定的PKCS 1标准#使用指定的消息摘要,掩码生成功能,掩模生成功能,参数长度和盐,拖车场值。
mdName
-散列函数的算法名称。
mgfName
-掩模的生成函数的算法名称。
mgfSpec
-掩模生成函数的参数。如果为空,则返回null将getmgfparameters()。
saltLen
-盐的长度。
trailerField
-拖车的字段的值。
NullPointerException
-如果
mdName
,或
mgfName
是空的。
IllegalArgumentException
-如果
saltLen
或
trailerField
小于0。
public PSSParameterSpec(int saltLen)
PSSParameterSpec
。
saltLen
-用于# PKCS 1 PSS编码盐位长度。
IllegalArgumentException
-如果
saltLen
小于0。
public String getDigestAlgorithm()
public String getMGFAlgorithm()
public AlgorithmParameterSpec getMGFParameters()
public int getSaltLength()
public int getTrailerField()
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.