Top Description Fields Constructors Methods
org.bouncycastle.openpgp.examples

public Class RSAKeyPairGenerator

extends Object
Class Inheritance
Imports
java.io.FileOutputStream, .IOException, .OutputStream, java.security.KeyPair, .KeyPairGenerator, .NoSuchAlgorithmException, .NoSuchProviderException, .Security, java.util.ArrayList, .Date, .Iterator, .List, org.bouncycastle.bcpg.ArmoredOutputStream, .CompressionAlgorithmTags, .HashAlgorithmTags, .PublicKeyAlgorithmTags, .SymmetricKeyAlgorithmTags, org.bouncycastle.bcpg.sig.Features, .KeyFlags, org.bouncycastle.jce.provider.BouncyCastleProvider, org.bouncycastle.openpgp.PGPException, .PGPKeyPair, .PGPKeyRingGenerator, .PGPPublicKey, .PGPPublicKeyRing, .PGPSecretKeyRing, .PGPSignature, .PGPSignatureSubpacketGenerator, org.bouncycastle.openpgp.operator.PBESecretKeyEncryptor, .PGPContentSignerBuilder, .PGPDigestCalculator, org.bouncycastle.openpgp.operator.jcajce.JcaPGPContentSignerBuilder, .JcaPGPDigestCalculatorProviderBuilder, .JcaPGPKeyPair, .JcePBESecretKeyEncryptorBuilder

A simple utility class that generates an RSA key ring.

usage: RSAKeyPairGenerator [-a] identity passPhrase

Where identity is the name to be associated with the public key. The keys are placed in the files pub.[asc|bpg] and secret.[asc|bpg].

Field Summary

Modifier and TypeField and Description
private static final int[]
private static final int[]
private static final int
private static final int[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
generateAndExportKeyRing(OutputStream secretOut, OutputStream publicOut, String identity, char[] passPhrase, boolean armor)

public static void
main(String[] args)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

COMP_PREFERENCESback to summary
private static final int[] COMP_PREFERENCES
HASH_PREFERENCESback to summary
private static final int[] HASH_PREFERENCES
SIG_HASHback to summary
private static final int SIG_HASH
SYM_PREFERENCESback to summary
private static final int[] SYM_PREFERENCES

Constructor Detail

RSAKeyPairGeneratorback to summary
public RSAKeyPairGenerator()

Method Detail

generateAndExportKeyRingback to summary
private static void generateAndExportKeyRing(OutputStream secretOut, OutputStream publicOut, String identity, char[] passPhrase, boolean armor) throws IOException, NoSuchProviderException, PGPException, NoSuchAlgorithmException
mainback to summary
public static void main(String[] args) throws Exception