protected byte[] engineGetEncoded() throws IOException {
  PSSParameterSpec pssSpec=currentSpec;
  AlgorithmIdentifier hashAlgorithm=new AlgorithmIdentifier(DigestFactory.getOID(pssSpec.getDigestAlgorithm()),DERNull.INSTANCE);
  MGF1ParameterSpec mgfSpec=(MGF1ParameterSpec)pssSpec.getMGFParameters();
  AlgorithmIdentifier maskGenAlgorithm=new AlgorithmIdentifier(PKCSObjectIdentifiers.id_mgf1,new AlgorithmIdentifier(DigestFactory.getOID(mgfSpec.getDigestAlgorithm()),DERNull.INSTANCE));
  RSASSAPSSparams pssP=new RSASSAPSSparams(hashAlgorithm,maskGenAlgorithm,new ASN1Integer(pssSpec.getSaltLength()),new ASN1Integer(pssSpec.getTrailerField()));
  return pssP.getEncoded("DER");
}

protected byte [ ] engineGetEncoded ( ) throws IOException { PSSParameterSpec pssSpec = currentSpec ; AlgorithmIdentifier hashAlgorithm = new AlgorithmIdentifier ( DigestFactory . getOID ( pssSpec . getDigestAlgorithm ( ) ) , DERNull . INSTANCE ) ; MGF1ParameterSpec mgfSpec = ( MGF1ParameterSpec ) pssSpec . getMGFParameters ( ) ; AlgorithmIdentifier maskGenAlgorithm = new AlgorithmIdentifier ( PKCSObjectIdentifiers . id_mgf1 , new AlgorithmIdentifier ( DigestFactory . getOID ( mgfSpec . getDigestAlgorithm ( ) ) , DERNull . INSTANCE ) ) ; RSASSAPSSparams pssP = new RSASSAPSSparams ( hashAlgorithm , maskGenAlgorithm , new ASN1Integer ( pssSpec . getSaltLength ( ) ) , new ASN1Integer ( pssSpec . getTrailerField ( ) ) ) ; return pssP . getEncoded ( "DER" ) ; }
return the pkcs # 1 asn . 1 structure rsassa - pss - params .
