arnaucube
arnaucube/shamirsecretsharingPublic Self-hosted repository
shamirsecretsharing/wasm/index.html
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" />
15	<input id="nShares" value="5"/>
16	<input id="nNeededShares" value="3"/>
17	<input id="p" value="7"/>
18	<button onClick="callCreateShares();">Create Shares</button>
19	<textarea id="sharesResult" rows="10" style="width: 80%;">
20	</textarea>
21	<script src="index.js"></script>
22</body>
23</html>