com.monica.javacom.ciphering
Class RSAKeyPair

java.lang.Object
  |
  +--com.monica.javacom.ciphering.RSAKeyPair

public class RSAKeyPair
extends java.lang.Object

This is the keypair object used to construct a key object to the RSA object, which implements the RSA encription algorithm. This object is generated by an RSAKeyPairGenerator. This object consists of two parts, a public and a private key.

See Also:
RSAKey, RSAKeyPairGenerator, RSA

Constructor Summary
RSAKeyPair(java.math.BigInteger in_modulus, java.math.BigInteger in_privateExponent, java.math.BigInteger in_publicExponent)
          Constructs a new RSAKeyPair object.
RSAKeyPair(RSAKey in_rsaPrivateKey, RSAKey in_rsaPublicKey)
          Constructs a new RSAKeyPair object.
RSAKeyPair(java.lang.String save)
          Constructs a new RSAKey object.
 
Method Summary
 RSAKey getPrivate()
          Returns the private key part of the RSAKey.
 RSAKey getPublic()
          Returns the public key part of the RSAKey.
 java.lang.String toString()
          Returns the serialized String representation of the RSAKeyPair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RSAKeyPair

public RSAKeyPair(RSAKey in_rsaPrivateKey,
                  RSAKey in_rsaPublicKey)
Constructs a new RSAKeyPair object. This method is normally called by program, if the intension is to compose a keypair of two keys.
Parameters:
in_rsaPrivateKey - this includes the private part of the RSAKeyPair
in_rsaPublicKey - this includes the public part of the RSAKeyPair

RSAKeyPair

public RSAKeyPair(java.math.BigInteger in_modulus,
                  java.math.BigInteger in_privateExponent,
                  java.math.BigInteger in_publicExponent)
Constructs a new RSAKeyPair object. This method is normally called by the AESKeyGeneratorprogram.
Parameters:
in_modulus - this includes the modulus part of both RSAKeys
in_privateExponent - this includes the private exponent part of the private RSAKey
in_publicExponent - this includes the public exponent part of the public RSAKey

RSAKeyPair

public RSAKeyPair(java.lang.String save)
           throws LoadKeyException
Constructs a new RSAKey object. This method is normally called when a serialized form of the RSAKey is given, this reconstructs the object.
Parameters:
save - this includes the serialized form of the RSAKey
Method Detail

getPrivate

public RSAKey getPrivate()
Returns the private key part of the RSAKey.
Returns:
the private key part of the RSAKey

getPublic

public RSAKey getPublic()
Returns the public key part of the RSAKey.
Returns:
the public key part of the RSAKey

toString

public java.lang.String toString()
Returns the serialized String representation of the RSAKeyPair.
Overrides:
toString in class java.lang.Object
Returns:
the serialized form of the RSAKeyPair