flux.file
Class PgpKeyFactory

java.lang.Object
  extended by flux.file.PgpKeyFactory

public abstract class PgpKeyFactory
extends java.lang.Object

Makes PGP public/private key pairs that can be used in conjunction with PGP file actions.

Author:
Copyright 2014 Flux Corporation. All rights reserved.

Constructor Summary
PgpKeyFactory()
           
 
Method Summary
abstract  PgpKeyPair makeElGamalKeyPair(int size)
          Makes an ElGamal PGP public/private key pair.
abstract  PgpKeyPair makeElGamalKeyPair(int size, java.lang.String password)
          Makes an ElGamal PGP public/private key pair with password protection on the private key.
static PgpKeyFactory makeInstance()
          Makes a new PgpKeyFactory instance.
abstract  PgpKeyPair makeRsaKeyPair(int size)
          Makes an RSA PGP public/private key pair.
abstract  PgpKeyPair makeRsaKeyPair(int size, java.lang.String password)
          Makes an RSA PGP public/private key pair with password protection on the private key.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PgpKeyFactory

public PgpKeyFactory()
Method Detail

makeInstance

public static PgpKeyFactory makeInstance()
Makes a new PgpKeyFactory instance.

Returns:
A new PgpKeyFactory instance.

makeElGamalKeyPair

public abstract PgpKeyPair makeElGamalKeyPair(int size)
                                       throws EngineException
Makes an ElGamal PGP public/private key pair. The size of the key is specified in bits.

Parameters:
size - The size of the encryption key in bits.
Returns:
A fully instantiated ElGamal PGP public/private key pair.
Throws:
EngineException - If there was a problem creating the key pair.

makeElGamalKeyPair

public abstract PgpKeyPair makeElGamalKeyPair(int size,
                                              java.lang.String password)
                                       throws EngineException
Makes an ElGamal PGP public/private key pair with password protection on the private key. The size of the key is specified in bits.

Parameters:
size - The size of the encryption key in bits.
password - The password for private key access. A password that is null or the empty string implies that no private key encryption occurs and that the private key is stored in the clear.
Returns:
A fully instantiated ElGamal PGP public/private key pair.
Throws:
EngineException - If there was a problem creating the key pair.

makeRsaKeyPair

public abstract PgpKeyPair makeRsaKeyPair(int size)
                                   throws EngineException
Makes an RSA PGP public/private key pair. The size of the key is specified in bits.

Parameters:
size - The size of the encryption key in bits.
Returns:
A fully instantiated RSA PGP public/private key pair.
Throws:
EngineException - If there was a problem creating the key pair.

makeRsaKeyPair

public abstract PgpKeyPair makeRsaKeyPair(int size,
                                          java.lang.String password)
                                   throws EngineException
Makes an RSA PGP public/private key pair with password protection on the private key. The size of the key is specified in bits.

Parameters:
size - The size of the encryption key in bits.
password - The password for private key access. A password that is null or the empty string implies that no private key encryption occurs and that the private key is stored in the clear.
Returns:
A fully instantiated RSA PGP public/private key pair.
Throws:
EngineException - If there was a problem creating the key pair.


© 2014 Flux Corporation. All rights reserved.