/* GABA:
   (class
     (name dsa_signer)
     (super signer)
     (vars
       (random object randomness)
       (public struct dsa_public)
       (a bignum)))
*/

struct dsa_signer
{
  struct signer super;
  struct randomness *random;
  struct dsa_public public;
  mpz_t a;
};
extern struct lsh_class dsa_signer_class;

static void do_dsa_signer_mark(struct lsh_object *o, 
void (*mark)(struct lsh_object *o))
{
  struct dsa_signer *i = (struct dsa_signer *) o;
  mark((struct lsh_object *) i->random);
  dsa_public_mark(&i->public, mark);
}

static void do_dsa_signer_free(struct lsh_object *o)
{
  struct dsa_signer *i = (struct dsa_signer *) o;
  dsa_public_free(&i->public);
  mpz_clear(i->a);
}

struct lsh_class dsa_signer_class =
{ STATIC_HEADER,
  &signer_class, "dsa_signer", sizeof(struct dsa_signer),
  do_dsa_signer_mark,
  do_dsa_signer_free
};