|
Oracle Security Developer Tools Crypto Java API Reference 10g Release 3 (10.1.3) B25378-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
oracle.security.crypto.core.KeyPairGenerator
An abstract class for randomly generating public/private key pairs.
This class has a factory method, getInstance, which can be used to create an instance for a particular algorithm.
| Field Summary | |
protected RandomBitsSource |
rbsThe source of randomness for the KeyPairGenerator. |
| Constructor Summary | |
protected |
KeyPairGenerator() |
| Method Summary | |
abstract KeyPair |
generateKeyPair()Generates a public/private key pair. |
abstract java.lang.String |
getAlgorithm()Returns the name of the algorithm for which the generated keys can be used. |
static KeyPairGenerator |
getInstance(AlgorithmIdentifier algID)Return a KeyPairGenerator for the given AlgorithmIdentifier. |
static KeyPairGenerator |
getInstance(java.lang.String algName)Deprecated. use the version of getInstance that takes an AlgorithmIdentifier as an argument. |
abstract void |
initialize(int strength, RandomBitsSource rbs)Initializes the key pair generator with the given source of randomness. |
abstract void |
setAlgID(AlgorithmIdentifier algID)Called by getInstance(java.lang.String) to initialize the key pair generator using the algorithm identifier and its parameters (if any). |
void |
setRandomBitsSource(RandomBitsSource rbs)Sets the RandomBitsSource. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected RandomBitsSource rbs
KeyPairGenerator.| Constructor Detail |
protected KeyPairGenerator()
| Method Detail |
public void setRandomBitsSource(RandomBitsSource rbs)
RandomBitsSource.
public abstract void initialize(int strength,
RandomBitsSource rbs)
strength - Indicates the size of the generated keys in an algorithm-specific way.rbs - A secure random bits source.
public abstract void setAlgID(AlgorithmIdentifier algID)
throws AlgorithmIdentifierException
getInstance(java.lang.String) to initialize the key pair generator using the algorithm identifier and its parameters (if any).AlgorithmIdentifierExceptionpublic abstract KeyPair generateKeyPair()
public abstract java.lang.String getAlgorithm()
public static KeyPairGenerator getInstance(java.lang.String algName)
throws java.lang.IllegalArgumentException
getInstance that takes an AlgorithmIdentifier as an argument.java.lang.IllegalArgumentException - if the type is unrecognized
public static KeyPairGenerator getInstance(AlgorithmIdentifier algID)
throws java.lang.IllegalArgumentException
KeyPairGenerator for the given AlgorithmIdentifier.IllegalArgumentException - if no KeyPairGenerator is registered for the algorithm ID.java.lang.IllegalArgumentException
|
Oracle Security Developer Tools Crypto Java API Reference 10g Release 3 (10.1.3) B25378-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||