Java 8 InvalidParameterSpecException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 InvalidParameterSpecException class.

This code example shows how to use the following methods:getCause, getMessage
     * Assertion: constructs InvalidParameterSpecException when <code>msg</code> 
     * is null 
     */ 
    public void testInvalidParameterSpecException03() { 
        String msg = null;
        InvalidParameterSpecException tE = new InvalidParameterSpecException(
                msg);
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    } 
} 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getCause, getMessage
     * Test for <code>InvalidParameterSpecException()</code> constructor 
     * Assertion: constructs InvalidParameterSpecException with no detail 
     * message 
     */ 
    public void testInvalidParameterSpecException01() { 
        InvalidParameterSpecException tE = new InvalidParameterSpecException();
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    } 
 
    /** 
     * Test for <code>InvalidParameterSpecException(String)</code> constructor 
     * Assertion: constructs InvalidParameterSpecException with detail message 
     * msg. Parameter <code>msg</code> is not null. 
     */ 
    public void testInvalidParameterSpecException02() { 
        InvalidParameterSpecException tE;
        for (int i = 0; i < msgs.length; i++) {
            tE = new InvalidParameterSpecException(msgs[i]);
            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
            AlgorithmParameterSpec paramSpec)
            throws InvalidParameterSpecException 
        { 
            if (!(paramSpec instanceof PBEParameterSpec))
            { 
                throw new InvalidParameterSpecException("PBEParameterSpec required to initialise a PKCS12 PBE parameters algorithm parameters object");
            } 
 
            PBEParameterSpec pbeSpec = (PBEParameterSpec)paramSpec;
 
            this.params = new PKCS12PBEParams(pbeSpec.getSalt(),
                pbeSpec.getIterationCount());
        } 
 
        protected void engineInit( 
            byte[] params)
            throws IOException 
        { 
            this.params = PKCS12PBEParams.getInstance(ASN1Primitive.fromByteArray(params));
        } 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        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();
    } 
 
    protected void engineInit( 
        byte[] params)
        throws IOException 
    { 
        // 
        // check that we don't have a DER encoded octet string 
        // 
        if ((params.length % 8) != 0
            && params[0] == 0x04 && params[1] == params.length - 2)
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        AlgorithmParameterSpec paramSpec)
        throws InvalidParameterSpecException 
    { 
        if (!(paramSpec instanceof DSAParameterSpec))
        { 
            throw new InvalidParameterSpecException("DSAParameterSpec required to initialise a DSA algorithm parameters object");
        } 
 
        this.currentSpec = (DSAParameterSpec)paramSpec;
    } 
 
    protected void engineInit( 
        byte[] params)
        throws IOException 
    { 
        try 
        { 
            DSAParameter dsaP = DSAParameter.getInstance(ASN1Primitive.fromByteArray(params));
 
            currentSpec = new DSAParameterSpec(dsaP.getP(), dsaP.getQ(), dsaP.getG());
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        else if (paramSpec == DHParameterSpec.class)
        { 
            return new DHParameterSpec(currentSpec.getP(), currentSpec.getG());
        } 
 
        throw new InvalidParameterSpecException("unknown parameter spec passed to ElGamal parameters object.");
    } 
 
    protected void engineInit( 
        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;
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        if (paramSpec == IESParameterSpec.class)
        { 
            return currentSpec;
        } 
 
        throw new InvalidParameterSpecException("unknown parameter spec passed to ElGamal parameters object.");
    } 
 
    protected void engineInit( 
        AlgorithmParameterSpec paramSpec)
        throws InvalidParameterSpecException 
    { 
        if (!(paramSpec instanceof IESParameterSpec))
        { 
            throw new InvalidParameterSpecException("IESParameterSpec required to initialise a IES algorithm parameters object");
        } 
 
        this.currentSpec = (IESParameterSpec)paramSpec;
    } 
 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
            AlgorithmParameterSpec paramSpec) 
            throws InvalidParameterSpecException 
        { 
            if (!(paramSpec instanceof DHParameterSpec))
            { 
                throw new InvalidParameterSpecException("DHParameterSpec required to initialise a Diffie-Hellman algorithm parameters object");
            } 
 
            this.currentSpec = (DHParameterSpec)paramSpec;
        } 
 
        protected void engineInit( 
            byte[] params) 
            throws IOException 
        { 
            try 
            { 
                DHParameter dhP = DHParameter.getInstance(params);
 
                if (dhP.getL() != null)
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        AlgorithmParameterSpec paramSpec)
        throws InvalidParameterSpecException 
    { 
        if (!(paramSpec instanceof GOST3410ParameterSpec))
        { 
            throw new InvalidParameterSpecException("GOST3410ParameterSpec required to initialise a GOST3410 algorithm parameters object");
        } 
 
        this.currentSpec = (GOST3410ParameterSpec)paramSpec;
    } 
 
    protected void engineInit( 
        byte[] params)
        throws IOException 
    { 
        try 
        { 
            ASN1Sequence seq = (ASN1Sequence)ASN1Primitive.fromByteArray(params);
 
            this.currentSpec = GOST3410ParameterSpec.fromPublicKeyAlg(
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
        protected AlgorithmParameterSpec localEngineGetParameterSpec(
            Class paramSpec)
            throws InvalidParameterSpecException 
        { 
            throw new InvalidParameterSpecException("unknown parameter spec passed to OAEP parameters object.");
        } 
     
        protected void engineInit( 
            AlgorithmParameterSpec paramSpec)
            throws InvalidParameterSpecException 
        { 
            this.currentSpec = paramSpec;
        } 
     
        protected void engineInit( 
            byte[] params) 
            throws IOException 
        { 
            try 
5
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Java 8 InvalidParameterSpecException Questions & Answers:

See Code Examples for Java 8 InvalidParameterSpecException Methods: