Code example for InvalidParameterSpecException

0
            AlgorithmParameterSpec paramSpec)
            throws InvalidParameterSpecException 
        { 
            if (!(paramSpec instanceof PSSParameterSpec))
            { 
                throw new InvalidParameterSpecException("PSSParameterSpec required to initialise an PSS algorithm parameters object");
            } 
     
            this.currentSpec = (PSSParameterSpec)paramSpec;
        } 
     
        protected void engineInit( 
            byte[] params) 
            throws IOException 
        { 
            try 
            { 
                RSASSAPSSparams pssP = RSASSAPSSparams.getInstance(params);
 
                currentSpec = new PSSParameterSpec(
                                       pssP.getHashAlgorithm().getAlgorithm().getId(),