public void init(CipherParameters param){
  if (param instanceof ParametersWithRandom) {
    ParametersWithRandom rParam=(ParametersWithRandom)param;
    key=(RSAKeyParameters)rParam.getParameters();
    random=rParam.getRandom();
  }
 else {
    key=(RSAKeyParameters)param;
    random=new SecureRandom();
  }
  if (key instanceof RSAPrivateCrtKeyParameters) {
    throw new IllegalArgumentException("generator requires RSA public key");
  }
}

public void init ( CipherParameters param ) { if ( param instanceof ParametersWithRandom ) { ParametersWithRandom rParam = ( ParametersWithRandom ) param ; key = ( RSAKeyParameters ) rParam . getParameters ( ) ; random = rParam . getRandom ( ) ; } else { key = ( RSAKeyParameters ) param ; random = new SecureRandom ( ) ; } if ( key instanceof RSAPrivateCrtKeyParameters ) { throw new IllegalArgumentException ( "generator requires RSA public key" ) ; } }
initialise the factor generator
