Commit 4e2a385b authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Complete binding of Tool_tkeygen

parent babcfc55
......@@ -23,13 +23,17 @@
<textarea id="tkeygen_group" rows="1" cols="80"></textarea>
</div>
<button id="do_tkeygen">Generate a keypair</button>
<div>
<h3>Generated key identifier</h3>
<textarea id="tkeygen_id" rows="1" cols="10" readonly="readonly"></textarea>
</div>
<div>
<h3>Generated secret key</h3>
<textarea rows="1" cols="80" readonly="readonly"></textarea>
<textarea id="tkeygen_secret" rows="1" cols="80" readonly="readonly"></textarea>
</div>
<div>
<h3>Generated public key</h3>
<textarea rows="1" cols="80" readonly="readonly"></textarea>
<textarea id="tkeygen_public" rows="1" cols="80" readonly="readonly"></textarea>
</div>
</div>
<div id="election">
......
......@@ -113,7 +113,11 @@ module Tkeygen = struct
let group = get_textarea "tkeygen_group"
end in
let module X = (val make (module P : PARAMS) : S) in
ignore (X.trustee_keygen ())
let open X in
let {id; priv; pub} = trustee_keygen () in
set_textarea "tkeygen_id" id;
set_textarea "tkeygen_secret" priv;
set_textarea "tkeygen_public" pub
let cmds = ["do_tkeygen", tkeygen]
end
......
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