{
ASN1InputStream aIn = new ASN1InputStream(params);
try
{
RSASSAPSSparams pssP = new RSASSAPSSparams((ASN1Sequence)aIn.readObject());
currentSpec = new PSSParameterSpec(
pssP.getHashAlgorithm().getObjectId().getId(),
pssP.getMaskGenAlgorithm().getObjectId().getId(),
new MGF1ParameterSpec(AlgorithmIdentifier.getInstance(pssP.getMaskGenAlgorithm().getParameters()).getObjectId().getId()),
pssP.getSaltLength().getValue().intValue(),
pssP.getTrailerField().getValue().intValue());
}
catch (ClassCastException e)
{
throw new IOException("Not a valid PSS Parameter encoding.");
}