public class CkiKeyPairGenerator
extends oracle.security.crypto.core.KeyPairGenerator
Constructor and Description |
---|
CkiKeyPairGenerator()
Empty constructor
|
CkiKeyPairGenerator(CkiSession session)
Creates a new CkiKeyPairGenerator
|
CkiKeyPairGenerator(CkiSlot slot)
Creates a new CkiKeyPairGenerator
|
Modifier and Type | Method and Description |
---|---|
oracle.security.crypto.core.KeyPair |
generateKeyPair()
Generates the key pair.
|
oracle.security.crypto.core.KeyPair |
generateKeyPair(boolean tokenPersistent)
Generates the key pair.
|
java.lang.String |
getAlgorithm()
Gets the algorithm used for the generation of the key pair.
|
int |
getRSAExponent()
Gets the RSA public exponent value.
|
CkiSlot |
getSlot()
Returns the slot used by this CkiKeyPairGenerator.
|
boolean |
getTokenPersistent()
Returns whether or not the keys will be persistent on the token.
|
void |
initialize(int strength, oracle.security.crypto.core.RandomBitsSource rbs)
Initializes the CkiKeyPairGenerator.
|
void |
setAlgID(oracle.security.crypto.core.AlgorithmIdentifier algID)
Sets the AlgorithmIdentifier for this KeyPairGenerator object.
|
void |
setRSAExponent(int rsaPubExponent)
Sets the RSA public exponent.
|
void |
setSlot(CkiSlot slot)
Set the slot for this CkiKeyPairGenerator.
|
void |
setTokenPersistent(boolean value)
Sets whether or not the generated key pairs are persistent on the token or exist only for the life of the session.
|
public CkiKeyPairGenerator()
public CkiKeyPairGenerator(CkiSlot slot) throws CryptokiException
slot
- A CkiSlot object representing the slot where to generate the keys.CryptokiException
public CkiKeyPairGenerator(CkiSession session)
session
- A CkiSession object representing the session to use to generate the keys.public void setSlot(CkiSlot slot) throws CryptokiException
slot
- The slot to be used.CryptokiException
public CkiSlot getSlot()
public void initialize(int strength, oracle.security.crypto.core.RandomBitsSource rbs)
initialize
in class oracle.security.crypto.core.KeyPairGenerator
strength
- The strength of the key pair.rbs
- The RandomBitsSource to be used.public void setAlgID(oracle.security.crypto.core.AlgorithmIdentifier algID) throws oracle.security.crypto.core.AlgorithmIdentifierException
setAlgID
in class oracle.security.crypto.core.KeyPairGenerator
oracle.security.crypto.core.AlgorithmIdentifierException
public void setTokenPersistent(boolean value)
true
.public boolean getTokenPersistent()
public oracle.security.crypto.core.KeyPair generateKeyPair()
true
: in that case the key pair will be persistent on the token.generateKeyPair
in class oracle.security.crypto.core.KeyPairGenerator
public oracle.security.crypto.core.KeyPair generateKeyPair(boolean tokenPersistent)
tokenPersistent
- Specifies whether or not the generated key pair are persistent on the tokenpublic java.lang.String getAlgorithm()
getAlgorithm
in class oracle.security.crypto.core.KeyPairGenerator
public void setRSAExponent(int rsaPubExponent)
rsaPubExponent
- The value to be used for the generation of RSA Key Pairs.public int getRSAExponent()