Package org.bouncycastle.bcpg

Examples of org.bouncycastle.bcpg.ElGamalPublicBCPGKey


                fact = KeyFactory.getInstance("DSA", provider);

                return new PGPPrivateKey(fact.generatePrivate(dsaPrivSpec), this.getKeyID());
            case PGPPublicKey.ELGAMAL_ENCRYPT:
            case PGPPublicKey.ELGAMAL_GENERAL:
                ElGamalPublicBCPGKey    elPub = (ElGamalPublicBCPGKey)pubPk.getKey();
                ElGamalSecretBCPGKey    elPriv = new ElGamalSecretBCPGKey(in);
                ElGamalPrivateKeySpec   elSpec = new ElGamalPrivateKeySpec(elPriv.getX(), new ElGamalParameterSpec(elPub.getP(), elPub.getG()));
           
                fact = KeyFactory.getInstance("ElGamal", provider);
           
                return new PGPPrivateKey(fact.generatePrivate(elSpec), this.getKeyID());
            default:
View Full Code Here

TOP

Related Classes of org.bouncycastle.bcpg.ElGamalPublicBCPGKey

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.