static int zp_to_bytes(unsigned char *data, element_t e) { int n; n = e->field->fixed_length_in_bytes; pbc_mpz_out_raw_n(data, n, e->data); return n; }
static int fp_to_bytes(unsigned char *data, element_t a) { mpz_t z; int n = a->field->fixed_length_in_bytes; mpz_init(z); fp_to_mpz(z, a); pbc_mpz_out_raw_n(data, n, z); mpz_clear(z); return n; }