int hcs_tst_flag(hcs_shares *hs, unsigned long index)
Test if the server given by index is to be counted.
Stores a number of shares, with flags indicating if they are currently to be counted.
Definition: hcs_shares.h:26
unsigned long size
Number of shares in this array.
Definition: hcs_shares.h:30
void ** server_id
Optional id of each shares server.
Definition: hcs_shares.h:29
void hcs_toggle_flag(hcs_shares *hs, unsigned long index)
Toggle the flag on hs at index.
void hcs_free_shares(hcs_shares *hs)
Frees a hcs_shares and all associated memory.
void hcs_clear_flag(hcs_shares *hs, unsigned long index)
Clear the flag on hs at index.
int * flag
Flags corresponding to each value in shares.
Definition: hcs_shares.h:28
mpz_t * shares
An array of share values.
Definition: hcs_shares.h:27
void hcs_set_flag(hcs_shares *hs, unsigned long index)
Set the flag on hs at index.
hcs_shares * hcs_init_shares(unsigned long size)
Initialise a hcs_shares and return a pointer to the newly created structure.
void hcs_set_share(hcs_shares *hs, mpz_t value, unsigned long index)
Set a share value for the server given by id index.