Java 8 InvalidAlgorithmParameterException - 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 InvalidAlgorithmParameterException class.

This code example shows how to use the following methods:
        protected void engineInit( 
            AlgorithmParameterSpec  genParamSpec,
            SecureRandom            random)
            throws InvalidAlgorithmParameterException 
        { 
            throw new InvalidAlgorithmParameterException("No supported AlgorithmParameterSpec for DSA parameter generation.");
        } 
 
        protected AlgorithmParameters engineGenerateParameters()
        { 
            DSAParametersGenerator pGen = new DSAParametersGenerator();
 
            if (random != null)
            { 
                pGen.init(strength, 20, random);
            } 
            else 
            { 
                pGen.init(strength, 20, new SecureRandom());
            } 
Full Snippet Info
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: getMessage
        { 
            engineInit(opmode, key, (AlgorithmParameterSpec)null, random);
        } 
        catch (InvalidAlgorithmParameterException e)
        { 
            throw new IllegalArgumentException(e.getMessage());
        } 
    } 
 
    protected byte[] engineUpdate( 
        byte[]  input,
        int     inputOffset,
        int     inputLen)
    { 
        throw new RuntimeException("not supported for wrapping");
    } 
 
    protected int engineUpdate( 
        byte[]  input,
        int     inputOffset,
Full Snippet Info
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
            SecureRandom            random)
            throws InvalidAlgorithmParameterException 
        { 
            if (!(params instanceof RSAKeyGenParameterSpec))
            { 
                throw new InvalidAlgorithmParameterException("parameter object not a RSAKeyGenParameterSpec");
            } 
            RSAKeyGenParameterSpec     rsaParams = (RSAKeyGenParameterSpec)params;
 
            param = new RSAKeyGenerationParameters(
                            rsaParams.getPublicExponent(),
                            random, rsaParams.getKeysize(), defaultTests);
 
            engine.init(param);
        } 
 
        public KeyPair generateKeyPair()
        { 
            AsymmetricCipherKeyPair     pair = engine.generateKeyPair();
            RSAKeyParameters            pub = (RSAKeyParameters)pair.getPublic();
Full Snippet Info
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: getMessage
        { 
            throw new PGPException("bad padding: " + e.getMessage(), e);
        } 
        catch (InvalidAlgorithmParameterException e)
        { 
            throw new PGPException("IV invalid: " + e.getMessage(), e);
        } 
        catch (InvalidKeyException e)
        { 
            throw new PGPException("key invalid: " + e.getMessage(), e);
        } 
    } 
} 
Full Snippet Info
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
    protected Object[] getData() { 
        Exception cause = new Exception(msgs[1]); 
        InvalidAlgorithmParameterException dExc = new InvalidAlgorithmParameterException(msgs[0], cause); 
        String msg = null; 
        Throwable th = null; 
        return new Object[] { new InvalidAlgorithmParameterException(), new InvalidAlgorithmParameterException(msg), 
                new InvalidAlgorithmParameterException(msgs[1]), 
                new InvalidAlgorithmParameterException(new Throwable()), new InvalidAlgorithmParameterException(th), 
                new InvalidAlgorithmParameterException(msgs[1], dExc) }; 
    } 
 
} 
Full Snippet Info
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: getMessage
            { 
                throw new PGPException("invalid key: " + e.getMessage(), e);
            } 
            catch (InvalidAlgorithmParameterException e)
            { 
                throw new PGPException("imvalid algorithm parameter: " + e.getMessage(), e);
            } 
        } 
 
        public OutputStream getOutputStream(OutputStream out)
        { 
            return new CipherOutputStream(out, c);
        } 
 
        public PGPDigestCalculator getIntegrityCalculator() 
        { 
            if (withIntegrityPacket)
            { 
                return new SHA1PGPDigestCalculator(); 
            } 
Full Snippet Info
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
    protected void engineInit( 
        AlgorithmParameterSpec genParamSpec,
        SecureRandom random)
        throws InvalidAlgorithmParameterException 
    { 
        throw new InvalidAlgorithmParameterException("No supported AlgorithmParameterSpec for GOST3410 parameter generation.");
    } 
 
    protected AlgorithmParameters engineGenerateParameters()
    { 
        GOST3410ParametersGenerator pGen = new GOST3410ParametersGenerator();
 
        if (random != null)
        { 
            pGen.init(strength, 2, random);
        } 
        else 
        { 
            pGen.init(strength, 2, new SecureRandom());
        } 
Full Snippet Info
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: getCause, getMessage
     * <code>InvalidAlgorithmParameterException(String, Throwable)</code> 
     * constructor Assertion: constructs InvalidAlgorithmParameterException when 
     * <code>cause</code> is not null <code>msg</code> is null 
     */ 
    public void testInvalidAlgorithmParameterException08() { 
        InvalidAlgorithmParameterException tE = new InvalidAlgorithmParameterException(
                null, tCause);
        if (tE.getMessage() != null) {
            String toS = tCause.toString();
            String getM = tE.getMessage();
            assertTrue("getMessage() must should ".concat(toS), (getM
                    .indexOf(toS) != -1));
        } 
        assertNotNull("getCause() must not return null", tE.getCause());
        assertEquals("getCause() must return ".concat(tCause.toString()), tE
                .getCause(), tCause);
    } 
 
    /** 
     * Test for 
     * <code>InvalidAlgorithmParameterException(String, Throwable)</code> 
Full Snippet Info
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
            SecureRandom            random)
            throws InvalidAlgorithmParameterException 
        { 
            if (!(genParamSpec instanceof DHGenParameterSpec))
            { 
                throw new InvalidAlgorithmParameterException("DH parameter generator requires a DHGenParameterSpec for initialisation");
            } 
            DHGenParameterSpec  spec = (DHGenParameterSpec)genParamSpec;
 
            this.strength = spec.getPrimeSize();
            this.l = spec.getExponentSize();
            this.random = random;
        } 
 
        protected AlgorithmParameters engineGenerateParameters()
        { 
            DHParametersGenerator        pGen = new DHParametersGenerator();
 
            if (random != null)
            { 
Full Snippet Info
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
            return new AlgorithmIdentifier(algId, params);
        } 
        catch (IOException e)
        { 
            throw new InvalidAlgorithmParameterException("unable to encode parameters object: " + e.getMessage());
        } 
    } 
 
    public AlgorithmIdentifier getAlgorithmIdentifier(ASN1ObjectIdentifier algorithm, AlgorithmParameterSpec algorithmSpec)
        throws InvalidAlgorithmParameterException 
    { 
        if (algorithmSpec instanceof OAEPParameterSpec)
        { 
            if (algorithmSpec.equals(OAEPParameterSpec.DEFAULT))
            { 
                return new AlgorithmIdentifier(algorithm,
                    new RSAESOAEPparams(RSAESOAEPparams.DEFAULT_HASH_ALGORITHM, RSAESOAEPparams.DEFAULT_MASK_GEN_FUNCTION, RSAESOAEPparams.DEFAULT_P_SOURCE_ALGORITHM)); 
            } 
            else 
Full Snippet Info
5
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Java 8 InvalidAlgorithmParameterException Questions & Answers:

See Code Examples for Java 8 InvalidAlgorithmParameterException Methods: