if (Configuration.DEBUG)
  protected PublicKey engineGeneratePublic(KeySpec keySpec)      throws InvalidKeySpecException  {    log.entering(this.getClass().getName(), "engineGeneratePublic()", keySpec);    PublicKey result = null;    if (keySpec instanceof DSAPublicKeySpec)      result = decodeDSSPublicKey((DSAPublicKeySpec) keySpec);    else if (keySpec instanceof RSAPublicKeySpec)      result = decodeRSAPublicKey((RSAPublicKeySpec) keySpec);    else if (keySpec instanceof DHPublicKeySpec)      result = decodeDHPublicKey((DHPublicKeySpec) keySpec);    else      {    if (! (keySpec instanceof X509EncodedKeySpec))      throw new InvalidKeySpecException("Unsupported key specification");    byte[] input = ((X509EncodedKeySpec) keySpec).getEncoded();        boolean ok = false;    // try DSS    try      {            result = DSSPublicKey.valueOf(input);            ok = true;      }    catch (InvalidParameterException ignored)      {            log.log(Level.FINE, "Exception in DSSPublicKey.valueOf(). Ignore",                    ignored);      }        if (! ok) // try RSA    try    {              result = GnuRSAPublicKey.valueOf(input);              ok = true;    }  catch (InvalidParameterException ignored)    {              log.log(Level.FINE,                      "Exception in GnuRSAPublicKey.valueOf(). Ignore",                      ignored);    }          if (! ok) // try DH            result = decodeDHPublicKey(input);      }    log.exiting(this.getClass().getName(), "engineGeneratePublic()", result);    return result;  }