Commit d43a8438 authored by Stephane Glondu's avatar Stephane Glondu

Election.MakeElection -> Election.Make

parent c906c565
......@@ -103,7 +103,7 @@ end
let encryptBallot params cred plaintext () =
let module P = (val params : ELECTION_DATA) in
let module G = P.G in
let module E = Election.MakeElection (G) (LwtJsRandom) in
let module E = Election.Make (G) (LwtJsRandom) in
let module CD = Credential.MakeDerive (G) in
let sk = CD.derive P.election.e_params.e_uuid cred in
lwt randomness = E.make_randomness P.election () in
......
......@@ -54,7 +54,7 @@ let question_length q =
(** Homomorphic elections *)
module MakeElection (G : GROUP) (M : RANDOM) = struct
module Make (G : GROUP) (M : RANDOM) = struct
open G
type 'a m = 'a M.t
......
......@@ -29,6 +29,6 @@ val get_group : Yojson.Safe.json election -> (module ELECTION_DATA)
val question_length : question -> int
module MakeElection (G : GROUP) (M : RANDOM) :
module Make (G : GROUP) (M : RANDOM) :
ELECTION with type elt = G.t and type 'a m = 'a M.t
(** Implementation of {!Signatures.ELECTION}. *)
......@@ -59,7 +59,7 @@ let parse_params p =
module Make (P : PARSED_PARAMS) : S = struct
open P
module E = Election.MakeElection (G) (DirectRandom)
module E = Election.Make (G) (DirectRandom)
module KG = Trustees.MakeSimple (G) (DirectRandom)
......
......@@ -68,7 +68,7 @@ let compute_partial_decryption _ =
Js.Opt.option !election >>= fun e ->
let election = Election.(get_group (of_string e)) in
let module P = (val election) in
let module E = Election.MakeElection (P.G) (DirectRandom) in
let module E = Election.Make (P.G) (DirectRandom) in
Js.Opt.option !encrypted_tally >>= fun e ->
let encrypted_tally = encrypted_tally_of_string P.G.read e in
document##getElementById (Js.string "private_key") >>= fun e ->
......
......@@ -113,7 +113,7 @@ let verifydiff dir1 dir2 =
(* the public keys / threshold parameters must be valid *)
let module ED = (val Election.(get_group (of_string election))) in
let open ED in
let module E = Election.MakeElection (G) (DirectRandom) in
let module E = Election.Make (G) (DirectRandom) in
let y =
match threshold with
| None ->
......
......@@ -36,7 +36,7 @@ module Make (D : ELECTION_DATA) (M : RANDOM with type 'a t = 'a Lwt.t) : WEB_ELE
let uuid = D.election.e_params.e_uuid
module G = D.G
module E = Election.MakeElection (G) (M)
module E = Election.Make (G) (M)
module B : WEB_BALLOT_BOX = struct
......
......@@ -1364,7 +1364,7 @@ let () =
in
let%lwt election = find_election uuid in
let module W = (val Election.get_group election) in
let module E = Election.MakeElection (W.G) (LwtRandom) in
let module E = Election.Make (W.G) (LwtRandom) in
let%lwt pks =
match%lwt Web_persist.get_threshold uuid with
| Some tp ->
......@@ -1402,7 +1402,7 @@ let handle_election_tally_release (uuid, ()) () =
let%lwt election = find_election uuid in
let%lwt metadata = Web_persist.get_election_metadata uuid in
let module W = (val Election.get_group election) in
let module E = Election.MakeElection (W.G) (LwtRandom) in
let module E = Election.Make (W.G) (LwtRandom) in
if metadata.e_owner = Some u then (
let%lwt npks, ntallied =
match%lwt Web_persist.get_election_state uuid with
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment