Class PGPKeyRingGenerator


  • public class PGPKeyRingGenerator
    extends java.lang.Object
    Generator for a PGP master and subkey ring. This class will generate both the secret and public key rings
    • Method Detail

      • addSubKey

        public void addSubKey​(PGPKeyPair keyPair)
                       throws PGPException
        Add a sub key to the key ring to be generated with default certification and inheriting the hashed/unhashed packets of the master key.
        Parameters:
        keyPair -
        Throws:
        PGPException
      • addSubKey

        public void addSubKey​(PGPKeyPair keyPair,
                              PGPSignatureSubpacketVector hashedPcks,
                              PGPSignatureSubpacketVector unhashedPcks)
                       throws PGPException
        Add a subkey with specific hashed and unhashed packets associated with it and default certification.
        Parameters:
        keyPair - public/private key pair.
        hashedPcks - hashed packet values to be included in certification.
        unhashedPcks - unhashed packets values to be included in certification.
        Throws:
        PGPException
      • generateSecretKeyRing

        public PGPSecretKeyRing generateSecretKeyRing()
        Return the secret key ring.
        Returns:
        a secret key ring.
      • generatePublicKeyRing

        public PGPPublicKeyRing generatePublicKeyRing()
        Return the public key ring that corresponds to the secret key ring.
        Returns:
        a public key ring.