-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
41 lines (40 loc) · 1.72 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ΛCYLIC LΛBS | Tangle SEED generator</title>
<link rel="shortcut icon" type="image/x-icon" href="https://acycliclabs.com/favicon-196x196.png" />
<link href="style.css" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
<script type="text/javascript" src="sjcl.js"></script>
</head>
<body>
<div class="menu">
<i class="fa fa-bars fa-2x"></i>
<ul>
<a href="/seedgen/about"><li>About</li></a>
<a href="https://acycliclabs.com/#contact" target="_blank"><li>Contact</li></a>
<a href="https://acycliclabs.com/" target="_blank"><li>Acyclic Labs</li></a>
</ul>
</div>
<div id="disc" class="disc">This seed is generated in your browser and not sent anywhere. You can also turn off your internet after the page has loaded.</div>
<div id="main" class="main">
<h1 id="seed">WAIT</h1>
</div>
<script type="text/javascript">
var gen = new sjcl.prng(10);
gen.startCollectors();
sjcl.random.addEventListener("seeded", function() { document.getElementById("seed").innerText = genSeed(); });
sjcl.random.addEventListener("progress", function(p) {
if(p != 1) {
document.getElementById("seed").innerText = "Collecting entropy, please move your mouse/device\nProgress: " + p * 100 + "%"
}
});
function genSeed() {
var seed = "";
for(;seed.length < 81;seed += sjcl.codec.base64.fromBits(sjcl.random.randomWords(33, 10)).replace(/[^A-Z9]+/g, '')) {};
return seed.substring(0,81);
}
</script>
</body>
</html>