Package org.bouncycastle.jce.provider

Examples of org.bouncycastle.jce.provider.JCEElGamalPrivateKey


        }
        else if (key instanceof DHPrivateKey)
        {
            if (elGamalFactory)
            {
                return new JCEElGamalPrivateKey((DHPrivateKey)key);
            }
            else
            {
                return new JCEDHPrivateKey((DHPrivateKey)key);
            }
        }
        else if (key instanceof DSAPublicKey)
        {
            return new JDKDSAPublicKey((DSAPublicKey)key);
        }
        else if (key instanceof DSAPrivateKey)
        {
            return new JDKDSAPrivateKey((DSAPrivateKey)key);
        }
        else if (key instanceof ElGamalPublicKey)
        {
            return new JCEElGamalPublicKey((ElGamalPublicKey)key);
        }
        else if (key instanceof ElGamalPrivateKey)
        {
            return new JCEElGamalPrivateKey((ElGamalPrivateKey)key);
        }

        throw new InvalidKeyException("key type unknown");
    }
View Full Code Here


        {
              return new JCEDHPrivateKey(info);
        }
        else if (algId.getObjectId().equals(OIWObjectIdentifiers.elGamalAlgorithm))
        {
              return new JCEElGamalPrivateKey(info);
        }
        else if (algId.getObjectId().equals(X9ObjectIdentifiers.id_dsa))
        {
              return new JDKDSAPrivateKey(info);
        }
View Full Code Here

                    throw new InvalidKeySpecException(e.toString());
                }
            }
            else if (keySpec instanceof ElGamalPrivateKeySpec)
            {
                return new JCEElGamalPrivateKey((ElGamalPrivateKeySpec)keySpec);
            }
   
            throw new InvalidKeySpecException("Unknown KeySpec type: " + keySpec.getClass().getName());
        }
View Full Code Here

        }
        else if (key instanceof DHPrivateKey)
        {
            if (elGamalFactory)
            {
                return new JCEElGamalPrivateKey((DHPrivateKey)key);
            }
            else
            {
                return new JCEDHPrivateKey((DHPrivateKey)key);
            }
        }
        else if (key instanceof DSAPublicKey)
        {
            return new JDKDSAPublicKey((DSAPublicKey)key);
        }
        else if (key instanceof DSAPrivateKey)
        {
            return new JDKDSAPrivateKey((DSAPrivateKey)key);
        }
        else if (key instanceof ElGamalPublicKey)
        {
            return new JCEElGamalPublicKey((ElGamalPublicKey)key);
        }
        else if (key instanceof ElGamalPrivateKey)
        {
            return new JCEElGamalPrivateKey((ElGamalPrivateKey)key);
        }

        throw new InvalidKeyException("key type unknown");
    }
View Full Code Here

        {
              return new JCEDHPrivateKey(info);
        }
        else if (algOid.equals(OIWObjectIdentifiers.elGamalAlgorithm))
        {
              return new JCEElGamalPrivateKey(info);
        }
        else if (algOid.equals(X9ObjectIdentifiers.id_dsa))
        {
              return new JDKDSAPrivateKey(info);
        }
View Full Code Here

                    throw new InvalidKeySpecException(e.toString());
                }
            }
            else if (keySpec instanceof ElGamalPrivateKeySpec)
            {
                return new JCEElGamalPrivateKey((ElGamalPrivateKeySpec)keySpec);
            }
   
            throw new InvalidKeySpecException("Unknown KeySpec type: " + keySpec.getClass().getName());
        }
View Full Code Here

TOP

Related Classes of org.bouncycastle.jce.provider.JCEElGamalPrivateKey

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.