shamirsecretsharing/go-shamirsecretsharing/wasm/index.html
go-shamirsecretsharing/wasm/index.htmlRaw
1<html>
2<head>
3 <meta charset="utf-8">
4 <title>shamirsecretsharing wasm</title>
5</head>
6<body>
7 <script src="wasm_exec.js"></script>
8 <script>
9 const go = new Go();
10 WebAssembly.instantiateStreaming(fetch('shamirsecretsharing.wasm'), go.importObject).then(function(dat) {
11 go.run(dat.instance);
12 });
13 </script>
14 <input id="secret" value="123456789" title="secret" />
15 <input id="nShares" value="5" title="nShares" />
16 <input id="nNeededShares" value="3" title="nNeededShares" />
17 <input id="p" value="171879804367519690300554482894542984104793303095416535421575087397479872914568537681950898838967105588522810694196545562424558060609619552125935120277761650477937931034625352827489211639332858312433285611335853953593672332879461761823122965792721080501957411113790396112857552217933702513677475650967659977873" title="random p" />
18 <button onClick="callCreateShares();">Create Shares</button>
19 <textarea id="sharesResult" rows="15" style="width: 80%;">
20 </textarea>
21 <script src="index.js"></script>
22</body>
23</html>