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

This code example shows how to use the following methods: getEncoded
        } 
        else 
        { 
            try 
            { 
                byte[]  bytes = publicKey.getEncoded();
 
                publicKey = JDKKeyFactory.createPublicKeyFromDERStream(bytes);
 
                if (publicKey instanceof DSAKey)
                { 
                    param = DSAUtil.generatePublicKeyParameter(publicKey);
                } 
                else 
                { 
                    throw new InvalidKeyException("can't recognise key type in DSA based signer");
                } 
            } 
            catch (Exception e)
            { 
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: toString, getAlgorithm, getEncoded, getFormat
This code example shows how to use the following methods: getEncoded
        } 
        else 
        { 
            try 
            { 
                byte[] bytes = publicKey.getEncoded();
 
                publicKey = JDKKeyFactory.createPublicKeyFromDERStream(bytes);
 
                if (publicKey instanceof ECPublicKey)
                { 
                    param = ECUtil.generatePublicKeyParameter(publicKey);
                } 
                else 
                { 
                    throw new InvalidKeyException("can't recognise key type in ECDSA based signer");
                } 
            } 
            catch (Exception e)
            { 
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: getEncoded
This code example shows how to use the following methods: getEncoded
 
        return bl;
    } 
 
    public boolean isPublicKeyBlackListed(PublicKey publicKey) {
        byte[] encoded = publicKey.getEncoded();
        Digest digest = new OpenSSLDigest.SHA1();
        digest.update(encoded, 0, encoded.length);
        byte[] out = new byte[digest.getDigestSize()];
        digest.doFinal(out, 0);
        return pubkeyBlacklist.contains(out);
    } 
 
    public boolean isSerialNumberBlackListed(BigInteger serial) {
        return serialBlacklist.contains(serial);
    } 
 
} 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Java 8 PublicKey Questions & Answers: