Ejemplo n.º 1
0
  /**
   * Generates an option instance containing suitable options and description.
   *
   * @return Option instance representing valid inputs to this instance.
   */
  protected Opt opt() {
    Opt opt = GeneratorTool.defaultOpt(SignaturePKey.class.getSimpleName(), 1);

    opt.setUsageComment(
        "(where "
            + SignaturePKey.class.getSimpleName()
            + " = "
            + SignaturePKey.class.getName()
            + ")");

    opt.addParameter("keypair", "Signature key pair " + "(vfork.crypto.SignatureKeyPair).");
    opt.addOption(
        "-cert",
        "value",
        "Determines the probability that the input key pair "
            + "is malformed, i.e., a value "
            + "of t gives a bound of 2^(-t)."
            + " Defaults to "
            + DEFAULT_CERT
            + ".");

    String s = "Extracts a signature public key from a key pair.";

    opt.appendToUsageForm(1, "#-cert#keypair#");
    opt.appendDescription(s);

    return opt;
  }