Package java.security.spec

Examples of java.security.spec.InvalidParameterSpecException


     */
    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


    public final <T extends AlgorithmParameterSpec>
  T getParameterSpec(Class<T> paramSpec)
  throws InvalidParameterSpecException
    {
  if (this.initialized == false) {
      throw new InvalidParameterSpecException("not initialized");
  }
  return paramSpi.engineGetParameterSpec(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 == IvParameterSpec.class)
        {
            return new IvParameterSpec(iv);
        }

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

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

        this.iv = ((IvParameterSpec)paramSpec).getIV();
    }
View Full Code Here

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

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

            if (paramSpec == PSSParameterSpec.class && currentSpec != null)
            {
                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

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.