| java.lang.Object org.bouncycastle.openpgp.PGPKeyRingGenerator
PGPKeyRingGenerator | public class PGPKeyRingGenerator (Code) | | Generator for a PGP master and subkey ring. This class will generate
both the secret and public key rings
|
Constructor Summary | |
public | PGPKeyRingGenerator(int certificationLevel, PGPKeyPair masterKey, String id, int encAlgorithm, char[] passPhrase, PGPSignatureSubpacketVector hashedPcks, PGPSignatureSubpacketVector unhashedPcks, SecureRandom rand, String provider) Create a new key ring generator using old style checksumming. | public | PGPKeyRingGenerator(int certificationLevel, PGPKeyPair masterKey, String id, int encAlgorithm, char[] passPhrase, boolean useSHA1, PGPSignatureSubpacketVector hashedPcks, PGPSignatureSubpacketVector unhashedPcks, SecureRandom rand, String provider) Create a new key ring generator. |
PGPKeyRingGenerator | public PGPKeyRingGenerator(int certificationLevel, PGPKeyPair masterKey, String id, int encAlgorithm, char[] passPhrase, PGPSignatureSubpacketVector hashedPcks, PGPSignatureSubpacketVector unhashedPcks, SecureRandom rand, String provider) throws PGPException, NoSuchProviderException(Code) | | Create a new key ring generator using old style checksumming. It is recommended to use
SHA1 checksumming where possible.
Parameters: certificationLevel - the certification level for keys on this ring. Parameters: masterKey - the master key pair. Parameters: id - the id to be associated with the ring. Parameters: encAlgorithm - the algorithm to be used to protect secret keys. Parameters: passPhrase - the passPhrase to be used to protect secret keys. Parameters: hashedPcks - packets to be included in the certification hash. Parameters: unhashedPcks - packets to be attached unhashed to the certification. Parameters: rand - input secured random Parameters: provider - the provider to use for encryption. throws: PGPException - throws: NoSuchProviderException - |
PGPKeyRingGenerator | public PGPKeyRingGenerator(int certificationLevel, PGPKeyPair masterKey, String id, int encAlgorithm, char[] passPhrase, boolean useSHA1, PGPSignatureSubpacketVector hashedPcks, PGPSignatureSubpacketVector unhashedPcks, SecureRandom rand, String provider) throws PGPException, NoSuchProviderException(Code) | | Create a new key ring generator.
Parameters: certificationLevel - the certification level for keys on this ring. Parameters: masterKey - the master key pair. Parameters: id - the id to be associated with the ring. Parameters: encAlgorithm - the algorithm to be used to protect secret keys. Parameters: passPhrase - the passPhrase to be used to protect secret keys. Parameters: useSHA1 - checksum the secret keys with SHA1 rather than the older 16 bit checksum. Parameters: hashedPcks - packets to be included in the certification hash. Parameters: unhashedPcks - packets to be attached unhashed to the certification. Parameters: rand - input secured random Parameters: provider - the provider to use for encryption. throws: PGPException - throws: NoSuchProviderException - |
addSubKey | public void addSubKey(PGPKeyPair keyPair) throws PGPException(Code) | | 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(Code) | | Add a subkey with specific hashed and unhashed packets associated with it and default
certification.
Parameters: keyPair - public/private key pair. Parameters: hashedPcks - hashed packet values to be included in certification. Parameters: unhashedPcks - unhashed packets values to be included in certification. throws: PGPException - |
generatePublicKeyRing | public PGPPublicKeyRing generatePublicKeyRing()(Code) | | Return the public key ring that corresponds to the secret key ring.
a public key ring. |
generateSecretKeyRing | public PGPSecretKeyRing generateSecretKeyRing()(Code) | | Return the secret key ring.
a secret key ring. |
|
|