Package org.bouncycastle.openpgp

Examples of org.bouncycastle.openpgp.PGPKeyRingGenerator.addSubKey()


        PGPKeyPair        elgKeyPair = new PGPKeyPair(PGPPublicKey.ELGAMAL_ENCRYPT, elgKp, new Date(), "BC");
       
        PGPKeyRingGenerator    keyRingGen = new PGPKeyRingGenerator(PGPSignature.POSITIVE_CERTIFICATION, dsaKeyPair,
                 identity, PGPEncryptedData.AES_256, passPhrase, true, null, null, new SecureRandom(), "BC");
       
        keyRingGen.addSubKey(elgKeyPair);
       
        keyRingGen.generateSecretKeyRing().encode(secretOut);
       
        secretOut.close();
       
View Full Code Here


        PGPKeyPair        elgKeyPair = new PGPKeyPair(PGPPublicKey.ELGAMAL_ENCRYPT, elgKp, new Date(), "BC");
   
        PGPKeyRingGenerator    keyRingGen = new PGPKeyRingGenerator(PGPSignature.POSITIVE_CERTIFICATION, dsaKeyPair,
                "test", PGPEncryptedData.AES_256, passPhrase, null, null, new SecureRandom(), "BC");
   
        keyRingGen.addSubKey(elgKeyPair);
   
        PGPSecretKeyRing       keyRing = keyRingGen.generateSecretKeyRing();
       
        keyRing.getSecretKey().extractPrivateKey(passPhrase, "BC");
       
View Full Code Here

        PGPKeyPair        elgKeyPair = new PGPKeyPair(PGPPublicKey.ELGAMAL_ENCRYPT, elgKp, new Date(), "BC");
   
        PGPKeyRingGenerator    keyRingGen = new PGPKeyRingGenerator(PGPSignature.POSITIVE_CERTIFICATION, dsaKeyPair,
                "test", PGPEncryptedData.AES_256, passPhrase, true, null, null, new SecureRandom(), "BC");
   
        keyRingGen.addSubKey(elgKeyPair);
   
        PGPSecretKeyRing       keyRing = keyRingGen.generateSecretKeyRing();
       
        keyRing.getSecretKey().extractPrivateKey(passPhrase, "BC");
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.