Class au.net.aba.security.KeyPairGenerator
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class au.net.aba.security.KeyPairGenerator

java.lang.Object
   |
   +----au.net.aba.security.KeyPairGenerator

public class KeyPairGenerator
extends Object
The KeyPairGenerator class is used to generate pairs of public and private keys. Key pair generators are constructed using the getInstance factory methods (static methods that return instances of a given class). A Key pair generator for a particular algorithm creates a public/private key pair that can be used with this algorithm. It also associates algorithm-specific parameters with each of the generated keys.

This class is not incomplete.


Variable Index

 o ident

Constructor Index

 o KeyPairGenerator(String)
Creates a KeyPairGenerator object for the specified algorithm.

Method Index

 o generateKeyPair()
Generates a key pair.
 o getAlgorithm()
Returns the standard name of the algorithm for this key pair generator.
 o getInstance(String)
Generates a KeyPairGenerator object that implements the specified digest algorithm.
 o getInstance(String, String)
Generates a KeyPairGenerator object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
 o initialize(AlgorithmParameterSpec)
Initialises the key pair generator using the specified parameter set and a system-provided source of randomness.
 o initialize(AlgorithmParameterSpec, SecureRandom)
Initialises the key pair generator using the specified parameter set and user-provided source of randomness.
 o initialize(int)
Initialises the key pair generator for a certain strength using a system-provided source of randomness and the default parameter set.
 o initialize(int, SecureRandom)
Initialises the key pair generator for a certain strength, using the default parameter set.

Variables

 o ident
  public final static String ident

Constructors

 o KeyPairGenerator
  protected KeyPairGenerator(String algorithm)
Creates a KeyPairGenerator object for the specified algorithm.

Methods

 o getAlgorithm
  public String getAlgorithm()
Returns the standard name of the algorithm for this key pair generator. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
 o getInstance
  public static KeyPairGenerator getInstance(String algorithm) throws NoSuchAlgorithmException
Generates a KeyPairGenerator object that implements the specified digest algorithm. If the default provider package provides an implementation of the requested digest algorithm, an instance of KeyPairGenerator containing that implementation is returned. If the algorithm is not available in the default package, other packages are searched..
Parameters:
algorithm - - the standard string name of the algorithm. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
Returns:
s the new KeyPairGenerator object.
Throws: NoSuchAlgorithmException
- if the algorithm is not available in the environment.
 o getInstance
  public static KeyPairGenerator getInstance(String algorithm,
                                             String provider) throws NoSuchAlgorithmException, NoSuchProviderException
Generates a KeyPairGenerator object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
Parameters:
algorithm - - the standard string name of the algorithm. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
Returns:
s the new KeyPairGenerator object.
Throws: NoSuchAlgorithmException
- if the algorithm is not available in the environment.
Throws: NoSuchProviderException
- if the algorithm is not available in the environment.
 o initialize
  public void initialize(int strength)
Initialises the key pair generator for a certain strength using a system-provided source of randomness and the default parameter set.
 o initialize
  public abstract void initialize(int strength,
                                  SecureRandom random)
Initialises the key pair generator for a certain strength, using the default parameter set.
 o initialize
  public void initialize(AlgorithmParameterSpec params,
                         SecureRandom rand) throws InvalidAlgorithmParameterException
Initialises the key pair generator using the specified parameter set and user-provided source of randomness.
Throws: InvalidAlgorithmParameterException
- if the provided params is invalid.
 o initialize
  public void initialize(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException
Initialises the key pair generator using the specified parameter set and a system-provided source of randomness.
Throws: InvalidAlgorithmParameterException
- if the provided params is invalid.
 o generateKeyPair
  public abstract KeyPair generateKeyPair()
Generates a key pair. Unless an initialisation method is called using a KeyPairGenerator interface, algorithm-specific defaults will be used. This will generate a new key pair every time it is called.

All Packages  Class Hierarchy  This Package  Previous  Next  Index