part2
Class SimpleRSAKeyGenerator

java.lang.Object
  extended bypart2.SimpleRSAKeyGenerator
All Implemented Interfaces:
RSAKeyPair

public class SimpleRSAKeyGenerator
extends java.lang.Object
implements RSAKeyPair


Constructor Summary
SimpleRSAKeyGenerator(java.math.BigInteger p, java.math.BigInteger q, java.security.SecureRandom rnd)
          A constructor that generates an RSA key-pair using the primes p and q.
 
Method Summary
 RSAPrivateKey getPrivate()
          A method to return the private key of this RSA key-pair.
 RSAPublicKey getPublic()
          A method to return the public key of this RSA key-pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleRSAKeyGenerator

public SimpleRSAKeyGenerator(java.math.BigInteger p,
                             java.math.BigInteger q,
                             java.security.SecureRandom rnd)
                      throws java.lang.Exception
A constructor that generates an RSA key-pair using the primes p and q.

Throws:
Exception.
java.lang.Exception
Method Detail

getPublic

public RSAPublicKey getPublic()
                       throws java.lang.Exception
A method to return the public key of this RSA key-pair.

Specified by:
getPublic in interface RSAKeyPair
Throws:
Exception.
java.lang.Exception

getPrivate

public RSAPrivateKey getPrivate()
                         throws java.lang.Exception
A method to return the private key of this RSA key-pair.

Specified by:
getPrivate in interface RSAKeyPair
Throws:
Exception.
java.lang.Exception