PSSParameterSpecpublic class PSSParameterSpec extends Object implements AlgorithmParameterSpecThe parameter specification for the RSA-PSS Signature scheme.
Defined in the PKCS #1 v2.1
standard.
|
Fields Summary |
---|
public static final PSSParameterSpec | DEFAULTThe default parameter specification. It specifies the following parameters:
- message digest: {@code "SHA-1"}
- mask generation function (mgf): {@code "MGF1"}
- parameters for the mgf: {@link MGF1ParameterSpec#SHA1}
- salt length: {@code 20}
- trailer field: {@code -1}
| private final String | mdName | private final String | mgfName | private final AlgorithmParameterSpec | mgfSpec | private final int | trailerField | private final int | saltLen |
Constructors Summary |
---|
public PSSParameterSpec(int saltLen)Creates a new {@code PSSParameterSpec} with the specified salt length
and the default values.
if (saltLen < 0) {
throw new IllegalArgumentException(Messages.getString("security.7F")); //$NON-NLS-1$
}
this.saltLen = saltLen;
this.mdName = "SHA-1"; //$NON-NLS-1$
this.mgfName = "MGF1"; //$NON-NLS-1$
this.mgfSpec = MGF1ParameterSpec.SHA1;
this.trailerField = 1;
| public PSSParameterSpec(String mdName, String mgfName, AlgorithmParameterSpec mgfSpec, int saltLen, int trailerField)Creates a new {@code PSSParameterSpec} with the specified message digest
name, mask generation function name, mask generation function parameters,
salt length, and trailer field value.
if (mdName == null) {
throw new NullPointerException(Messages.getString("security.80")); //$NON-NLS-1$
}
if (mgfName == null) {
throw new NullPointerException(Messages.getString("security.81")); //$NON-NLS-1$
}
if (saltLen < 0) {
throw new IllegalArgumentException(Messages.getString("security.7F")); //$NON-NLS-1$
}
if (trailerField < 0) {
throw new IllegalArgumentException(Messages.getString("security.82")); //$NON-NLS-1$
}
this.mdName = mdName;
this.mgfName = mgfName;
this.mgfSpec = mgfSpec;
this.saltLen = saltLen;
this.trailerField = trailerField;
|
Methods Summary |
---|
public java.lang.String | getDigestAlgorithm()Returns the name of the message digest algorithm.
return mdName;
| public java.lang.String | getMGFAlgorithm()Returns the name of the mask generation function algorithm.
return mgfName;
| public java.security.spec.AlgorithmParameterSpec | getMGFParameters()Returns the parameter for the mask generation function algorithm.
return mgfSpec;
| public int | getSaltLength()Returns the length of the salt (in bits).
return saltLen;
| public int | getTrailerField()Returns the trailer field value.
return trailerField;
|
|