-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
120 lines (114 loc) · 4.53 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Cache-control" content="no-cache">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>7w: Mnemonic Password Generator</title>
<meta name="description" content="Mnemonic Password Generator, Password manager, Password anti-manager">
<meta name="keywords" content="mnemonic,password,generator,password generator">
<meta name="author" content="Denis Lepekhin">
<link rel="stylesheet" href="style.css">
<script src="wasm_exec.js"></script>
<script>
const go = new Go()
const instantiateStreaming = async (resp, importObject) => {
const source = await (await resp).arrayBuffer();
return await WebAssembly.instantiate(source, importObject);
};
instantiateStreaming(fetch("entrop.wasm"), go.importObject).then((result) => {
go.run(result.instance)
setTimeout(() => {
document.querySelector('#version').innerHTML = window.Entrop_Version
}, 100)
}).catch((err) => {
console.error("wasm err:" + err)
});
</script>
<script src="7w.js" type="text/javascript"></script>
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico">
</head>
<body>
<form autocomplete="off" class="s-form">
<div class="mode-container">
<p class="ib">
<label class="mode-label"><input type="radio" name="mode" value="s" id="sMode" checked>stealth</label>
<label class="mode-label"><input type="radio" name="mode" value="v" id="vMode">visible</label>
</p>
<p class="readme ib"> <a class="" href="https://github.com/dlepex/7w#7w">readme</a></p>
</div>
<fieldset>
<legend>Words</legend>
<div id="wordsPane">
<div class="word"><span class="word-num">1</span><input id="w0" pattern="\S+" type="password" /></div>
</div>
<p class="info"> Words must be memorable. For maximum security at least 1 word must be nondictionary.</p>
</fieldset>
<div class="control-pane">
<label class="label" for="pwdLength">password length</label><input type="number" id="pwdLength" value="15" min="4"
max="300">
<div id="btnPane" class="ib">
<button type="button" id="genBtn">Generate</button>
<button type="button" id="copyBtn">Generate&Copy</button>
<button type="button" id="clearBtn">Clear</button>
</div>
<div id="waitPane" class="ib hidden">
<p class="info"><b>Calculating. Wait...</b></p>
</div>
</div>
<fieldset id="errPane" class="hidden">
<legend>Error</legend>
<span id="err"></span>
</fieldset>
<fieldset id="resultPane" class="hidden">
<legend>Result</legend>
<div class="ed">
<input type="password" id="result" readonly>
<button type="button" class="edbtn" id="showBtn">show</button>
</div>
<p class="info hidden" id="pwdInfo"></p>
<div id="hashedPane" class="hidden ed">
</div>
</fieldset>
<fieldset>
<legend>Extra Params</legend>
<p>
<label class="label" for="charset">charset</label>
<select name="charset" id="charset">
<option value="alnum">alphanumeric</option>
<option value="pasc">print.ascii</option>
<option value="num">digits</option>
<option value="al">letters</option>
<option value="lower">lower</option>
<option value="upper">upper</option>
<option value="hex">hex</option>
<option value="bin">bin</option>
</select>
<label class="label" for="sep">separator</label>
<input type="text" id="hashedStrSep">
</p>
<p>
<label class="label" for="alg">algorithm</label>
<select name="alg" id="alg">
<option value="pbs5">pbkdf2-sha512</option>
<option value="pbs2">pbkdf2-sha256</option>
<option value="ar">argon2</option>
<option value="rh">rephash</option>
<option value="old">old</option>
<option value="old2">old-sha256</option>
<option value="old5">old-sha512</option>
</select>
</p>
<p>
<label class="label" for="defVer">defaults version</label>
<input type="number" id="defVer" value="0" min="0" max="5">
</p>
<div id="entrop_pane">
<label class="label" for="entropArgs">cmdline</label><input type="text" id="entropArgs">
</div>
<p class="info">Default separator is 1 space. If you change extras be sure you can remember them.</p>
</fieldset>
</form>
<p id="version" class="info readme"></p>
</body>
</html>