|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.monica.javacom.ciphering.RSAKeyPairGenerator
Realizes an RSAKeyPairGenerator. This object is used to create a proper RSAKeyPair for using it in an RSA encoder/decoder. The RSAKeyPair retruned by the generating function must be splitted, and then passed to the RSA object.
RSAKeyPair
,
RSAKey
,
RSA
Constructor Summary | |
RSAKeyPairGenerator(int in_keyLength,
int in_certainty,
int in_publicKey,
java.util.Random in_random)
Constructs a new RSAKeyPairGenerator. |
Method Summary | |
RSAKeyPair |
generateRSAKeyPair()
Generates a new RSAKeyPair with the given keyLength, certainty, publicKey and Random object. |
int |
getCertainty()
Returns the certainty of the being prime of the modulus components. |
int |
getKeyLength()
Returns the keylength of the RSAKeyPair to be generated. |
int |
getPublicKey()
Returns the suggested public key of the RSAKeyPair to be generated. |
void |
setCertainty(int in_certainty)
Sets the certainty. |
void |
setKeyLength(int in_keyLength)
Sets the keylength of the RSAKeyPair to be generated. |
void |
setPublicKey(int in_publicKey)
Sets the suggested public key exponent. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RSAKeyPairGenerator(int in_keyLength, int in_certainty, int in_publicKey, java.util.Random in_random) throws BadInputValueException
in_keyLength
- the keylength of the RSAKey to be generated - default: 256in_certainty
- the certainty, that the numbers generated are primes, P=1-2^(-certainty) - default: 100in_publicKey
- the suggested publicKey-exponent - default: 65537in_random
- the Random object the RSAKeyPairGenerator will use to generate the random numbersBadInputValueException
- the in_keyLength must be between 16 and 65536BadInputValueException
- the in_certainty must be between 1 and 65536BadInputValueException
- the in_publicKey must be odd and greater than 2Method Detail |
public RSAKeyPair generateRSAKeyPair()
public int getKeyLength()
public int getCertainty()
public int getPublicKey()
public void setKeyLength(int in_keyLength) throws BadInputValueException
in_keyLength
- the keylength of the RSAKey to be generated - default: 256BadInputValueException
- the in_keyLength must be between 16 and 65536public void setCertainty(int in_certainty) throws BadInputValueException
in_certainty
- the certainty, that the numbers generated are primes, P=1-2^(-certainty) - default: 100BadInputValueException
- the in_certainty must be between 1 and 65536public void setPublicKey(int in_publicKey) throws BadInputValueException
in_publicKey
- the suggested publicKey-exponent - default: 65537BadInputValueException
- the in_publicKey must be odd and greater than 2
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |