Package java.security.spec

Examples of java.security.spec.InvalidParameterSpecException


                AlgorithmParameterSpec paramSpec)
        throws InvalidParameterSpecException
        {
            if (!(paramSpec instanceof GOST3410ParameterSpec))
            {
                throw new InvalidParameterSpecException("GOST3410ParameterSpec required to initialise a GOST3410 algorithm parameters object");
            }
           
            this.currentSpec = (GOST3410ParameterSpec)paramSpec;
        }
View Full Code Here


            else if (paramSpec == DHParameterSpec.class)
            {
                return new DHParameterSpec(currentSpec.getP(), currentSpec.getG());
            }

            throw new InvalidParameterSpecException("unknown parameter spec passed to ElGamal parameters object.");
        }
View Full Code Here

            AlgorithmParameterSpec paramSpec)
            throws InvalidParameterSpecException
        {
            if (!(paramSpec instanceof ElGamalParameterSpec) && !(paramSpec instanceof DHParameterSpec))
            {
                throw new InvalidParameterSpecException("DHParameterSpec required to initialise a ElGamal algorithm parameters object");
            }

            if (paramSpec instanceof ElGamalParameterSpec)
            {
                this.currentSpec = (ElGamalParameterSpec)paramSpec;
View Full Code Here

            if (paramSpec == IESParameterSpec.class)
            {
                return currentSpec;
            }

            throw new InvalidParameterSpecException("unknown parameter spec passed to ElGamal parameters object.");
        }
View Full Code Here

            AlgorithmParameterSpec paramSpec)
            throws InvalidParameterSpecException
        {
            if (!(paramSpec instanceof IESParameterSpec))
            {
                throw new InvalidParameterSpecException("IESParameterSpec required to initialise a IES algorithm parameters object");
            }

            this.currentSpec = (IESParameterSpec)paramSpec;
        }
View Full Code Here

            if (paramSpec == PSSParameterSpec.class && currentSpec instanceof PSSParameterSpec)
            {
                return currentSpec;
            }
   
            throw new InvalidParameterSpecException("unknown parameter spec passed to PSS parameters object.");
        }
View Full Code Here

            AlgorithmParameterSpec paramSpec)
            throws InvalidParameterSpecException
        {
            if (!(paramSpec instanceof PSSParameterSpec))
            {
                throw new InvalidParameterSpecException("PSSParameterSpec required to initialise an PSS algorithm parameters object");
            }
   
            this.currentSpec = (PSSParameterSpec)paramSpec;
        }
View Full Code Here

     *             for initializing this {@code AlgorithmParameters}.
     */
    public final void init(AlgorithmParameterSpec paramSpec)
            throws InvalidParameterSpecException {
        if (initialized) {
            throw new InvalidParameterSpecException(
                    Messages.getString("security.1E")); //$NON-NLS-1$
        }
        spiImpl.engineInit(paramSpec);
        initialized = true;
    }
View Full Code Here

     *             the specified class.
     */
    public final <T extends AlgorithmParameterSpec> T getParameterSpec(Class<T> paramSpec)
            throws InvalidParameterSpecException {
        if (!initialized) {
            throw new InvalidParameterSpecException(
                    Messages.getString("security.1F")); //$NON-NLS-1$
        }
        return spiImpl.engineGetParameterSpec(paramSpec);
    }
View Full Code Here

     */
    public final void init(AlgorithmParameterSpec paramSpec)
        throws InvalidParameterSpecException
    {
        if (this.initialized)
            throw new InvalidParameterSpecException("already initialized");
        paramSpi.engineInit(paramSpec);
        this.initialized = true;
    }
View Full Code Here

TOP

Related Classes of java.security.spec.InvalidParameterSpecException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.