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

This code example shows how to use the following methods:
            return new ECPrivateKeyParameters( 
                            k.getD(),
                            new ECDomainParameters(s.getCurve(), s.getG(), s.getN(), s.getH(), s.getSeed()));
        } 
                         
        throw new InvalidKeyException("can't identify EC private key.");
    } 
 
    public static DERObjectIdentifier getNamedCurveOid( 
        String name)
    { 
        DERObjectIdentifier oid = X962NamedCurves.getOID(name);
         
        if (oid == null)
        { 
            oid = SECNamedCurves.getOID(name);
            if (oid == null)
            { 
                oid = NISTNamedCurves.getOID(name);
            } 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
param = DSAUtil.generatePublicKeyParameter(publicKey);
                } 
                else 
                { 
                    throw new InvalidKeyException("can't recognise key type in DSA based signer");
                } 
            } 
            catch (Exception e)
            { 
                throw new InvalidKeyException("can't recognise key type in DSA based signer");
            } 
        } 
 
        digest.reset();
        signer.init(false, param);
    } 
 
    protected void engineInitSign( 
        PrivateKey      privateKey,
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
param = ECUtil.generatePublicKeyParameter(publicKey);
                } 
                else 
                { 
                    throw new InvalidKeyException("can't recognise key type in ECDSA based signer");
                } 
            } 
            catch (Exception e)
            { 
                throw new InvalidKeyException("can't recognise key type in ECDSA based signer");
            } 
        } 
 
        digest.reset(); 
        signer.init(false, param);
    } 
 
    protected void engineInitSign( 
        PrivateKey privateKey,
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getMessage
        } 
 
        try { 
            keyAgreement.init(encryptKey);
        } catch (InvalidKeyException e) {
            Assert.fail(e.getMessage());
        } 
        try { 
            keyAgreement.doPhase(decryptKey, true);
        } catch (InvalidKeyException e) {
            Assert.fail(e.getMessage());
        } catch (IllegalStateException e) {
            Assert.fail(e.getMessage());
        } 
        Assert.assertNotNull("generated secret is null", keyAgreement
                .generateSecret());
 
    } 
} 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
    throws IllegalBlockSizeException, java.security.InvalidKeyException 
    { 
        byte[] encoded = key.getEncoded();
        if (encoded == null)
        { 
            throw new InvalidKeyException("Cannot wrap key, null encoding.");
        } 
 
        try 
        { 
            if (wrapEngine == null)
            { 
                return engineDoFinal(encoded, 0, encoded.length);
            } 
            else 
            { 
                return wrapEngine.wrap(encoded, 0, encoded.length);
            } 
        } 
        catch (BadPaddingException e)
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Java 8 InvalidKeyException Questions & Answers: