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.
-
ident
-
-
KeyPairGenerator(String)
- Creates a KeyPairGenerator object for the specified algorithm.
-
generateKeyPair()
- Generates a key pair.
-
getAlgorithm()
- Returns the standard name of the algorithm for this key pair
generator.
-
getInstance(String)
- Generates a KeyPairGenerator object that implements the specified
digest algorithm.
-
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.
-
initialize(AlgorithmParameterSpec)
- Initialises the key pair generator using the specified parameter
set and a system-provided source of randomness.
-
initialize(AlgorithmParameterSpec, SecureRandom)
- Initialises the key pair generator using the specified parameter set
and user-provided source of randomness.
-
initialize(int)
- Initialises the key pair generator for a certain strength using a
system-provided source of randomness and the default parameter set.
-
initialize(int, SecureRandom)
- Initialises the key pair generator for a certain strength,
using the default parameter set.
ident
public final static String ident
KeyPairGenerator
protected KeyPairGenerator(String algorithm)
- Creates a KeyPairGenerator object for the specified algorithm.
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.
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.
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.
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.
initialize
public abstract void initialize(int strength,
SecureRandom random)
- Initialises the key pair generator for a certain strength,
using the default parameter set.
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.
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.
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