com.monica.javacom.ciphering
Class RSAKey

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

public class RSAKey
extends java.lang.Object

This is the key object used to the RSA object, which implements the RSA encription algorithm. This object is part of an RSAKeyPair, generated by an RSAKeyPairGenerator. It consists of a modulus and an exponent, as defined in the RSA encsription algorithm.

See Also:
RSAKeyPair, RSAKeyPairGenerator, RSA

Constructor Summary
RSAKey(java.math.BigInteger in_modulus, java.math.BigInteger in_exponent)
          Constructs a new RSAKey object.
RSAKey(java.lang.String save)
          Constructs a new RSAKey object.
 
Method Summary
 java.math.BigInteger getExponent()
          Returns the exponent of the RSAKey.
 java.math.BigInteger getModulus()
          Returns the modulus of the RSAKey.
 java.lang.String toString()
          Returns the serialized String representation of the RSAKey.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RSAKey

public RSAKey(java.math.BigInteger in_modulus,
              java.math.BigInteger in_exponent)
Constructs a new RSAKey object. This method is normally called by the program, splitting the RSAKeyPair in public and private parts.
Parameters:
in_modulus - this includes the modulus part of the RSAKey
in_exponent - this includes the exponent part of the RSAKey

RSAKey

public RSAKey(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

getModulus

public java.math.BigInteger getModulus()
Returns the modulus of the RSAKey.
Returns:
the modulus part of the RSAKey

getExponent

public java.math.BigInteger getExponent()
Returns the exponent of the RSAKey.
Returns:
the exponent part of the RSAKey

toString

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