C# Class Org.BouncyCastle.Bcpg.OpenPgp.PgpKeyRingGenerator

Generator for a PGP master and subkey ring. This class will generate both the secret and public key rings
Show file Open project: red-gate/iTextSharp-4.1.6 Class Usage Examples

Public Methods

Method Description
AddSubKey ( PgpKeyPair keyPair ) : void

Add a subkey to the key ring to be generated with default certification.

AddSubKey ( PgpKeyPair keyPair, PgpSignatureSubpacketVector hashedPackets, PgpSignatureSubpacketVector unhashedPackets ) : void

Add a subkey with specific hashed and unhashed packets associated with it and default certification.

GeneratePublicKeyRing ( ) : PgpPublicKeyRing

Return the public key ring that corresponds to the secret key ring.

GenerateSecretKeyRing ( ) : PgpSecretKeyRing

Return the secret key ring.

PgpKeyRingGenerator ( int certificationLevel, PgpKeyPair masterKey, string id, SymmetricKeyAlgorithmTag encAlgorithm, char passPhrase, PgpSignatureSubpacketVector hashedPackets, PgpSignatureSubpacketVector unhashedPackets, SecureRandom rand ) : System

Create a new key ring generator using old style checksumming. It is recommended to use SHA1 checksumming where possible.

PgpKeyRingGenerator ( int certificationLevel, PgpKeyPair masterKey, string id, SymmetricKeyAlgorithmTag encAlgorithm, char passPhrase, bool useSha1, PgpSignatureSubpacketVector hashedPackets, PgpSignatureSubpacketVector unhashedPackets, SecureRandom rand ) : System

Create a new key ring generator.

Method Details

AddSubKey() public method

Add a subkey to the key ring to be generated with default certification.
public AddSubKey ( PgpKeyPair keyPair ) : void
keyPair PgpKeyPair
return void

AddSubKey() public method

Add a subkey with specific hashed and unhashed packets associated with it and default certification.
public AddSubKey ( PgpKeyPair keyPair, PgpSignatureSubpacketVector hashedPackets, PgpSignatureSubpacketVector unhashedPackets ) : void
keyPair PgpKeyPair Public/private key pair.
hashedPackets PgpSignatureSubpacketVector Hashed packet values to be included in certification.
unhashedPackets PgpSignatureSubpacketVector Unhashed packets values to be included in certification.
return void

GeneratePublicKeyRing() public method

Return the public key ring that corresponds to the secret key ring.
public GeneratePublicKeyRing ( ) : PgpPublicKeyRing
return PgpPublicKeyRing

GenerateSecretKeyRing() public method

Return the secret key ring.
public GenerateSecretKeyRing ( ) : PgpSecretKeyRing
return PgpSecretKeyRing

PgpKeyRingGenerator() public method

Create a new key ring generator using old style checksumming. It is recommended to use SHA1 checksumming where possible.
public PgpKeyRingGenerator ( int certificationLevel, PgpKeyPair masterKey, string id, SymmetricKeyAlgorithmTag encAlgorithm, char passPhrase, PgpSignatureSubpacketVector hashedPackets, PgpSignatureSubpacketVector unhashedPackets, SecureRandom rand ) : System
certificationLevel int The certification level for keys on this ring.
masterKey PgpKeyPair The master key pair.
id string The id to be associated with the ring.
encAlgorithm SymmetricKeyAlgorithmTag The algorithm to be used to protect secret keys.
passPhrase char The passPhrase to be used to protect secret keys.
hashedPackets PgpSignatureSubpacketVector Packets to be included in the certification hash.
unhashedPackets PgpSignatureSubpacketVector Packets to be attached unhashed to the certification.
rand Org.BouncyCastle.Security.SecureRandom input secured random.
return System

PgpKeyRingGenerator() public method

Create a new key ring generator.
public PgpKeyRingGenerator ( int certificationLevel, PgpKeyPair masterKey, string id, SymmetricKeyAlgorithmTag encAlgorithm, char passPhrase, bool useSha1, PgpSignatureSubpacketVector hashedPackets, PgpSignatureSubpacketVector unhashedPackets, SecureRandom rand ) : System
certificationLevel int The certification level for keys on this ring.
masterKey PgpKeyPair The master key pair.
id string The id to be associated with the ring.
encAlgorithm SymmetricKeyAlgorithmTag The algorithm to be used to protect secret keys.
passPhrase char The passPhrase to be used to protect secret keys.
useSha1 bool Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
hashedPackets PgpSignatureSubpacketVector Packets to be included in the certification hash.
unhashedPackets PgpSignatureSubpacketVector Packets to be attached unhashed to the certification.
rand Org.BouncyCastle.Security.SecureRandom input secured random.
return System