forked from Rabbit-Company/Argon2id-JS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
36 lines (34 loc) · 1.83 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
<!DOCTYPE html>
<html>
<head>
<title>Argon2id-JS</title>
<!-- 1. Include worker to increase performance. -->
<script src="Argon2idWorker.min.js"></script>
<!-- 2. Include Argon2id library. -->
<script src="Argon2id.min.js"></script>
</head>
<body>
<h1><a href="https://github.com/Rabbit-Company/Argon2id-JS" target="_blank">Argon2id-JS</a></h1>
<textarea id="message" rows="5" cols="50"></textarea></br></br>
<label>Salt: </label><input id="salt" type="text" placeholder="Salt"><br/>
<label>Parallelism Factor: </label><input id="p" type="number" min="1" max="16" value="3" placeholder="p"><br/>
<label>Memory Cost: </label><input id="m" type="number" min="32" max="1024" value="32" placeholder="m"><br/>
<label>Iterations: </label><input id="i" type="number" min="1" max="100" value="2" placeholder="t"><br/>
<label>Hash Length: </label><input id="l" type="number" min="1" max="64" value="32" placeholder="l"><br/><br/>
<label>Secret: </label><input id="secret" type="text" placeholder="Secret"><br/>
<label>Associated Data: </label><input id="associatedData" type="text" placeholder="Associated Data"><br/></br>
<button id="start">Hash</button>
<p id="hash"></p>
<h1>Validator</h1>
<textarea id="message2" rows="5" cols="50"></textarea></br></br>
<label>Secret: </label><input id="secret2" type="text" placeholder="Secret"><br/>
<label>Associated Data: </label><input id="associatedData2" type="text" placeholder="Associated Data"><br/></br>
<label>Hash Encoded: </label><input id="hashEncoded" type="text" placeholder="$argon2id$v=19$m=32,t=2,p=3$VjI0cFYyYTdtVzM1NDRkaA$7oQ9QNSpyrk/lwi3Gfq6q+7XPNiD3UcejGKz9koRLGk"><br/></br>
<button id="verify">Validate</button>
<p id="validate"></p>
<h1>Performance</h1>
<p id="perf"></p>
<!-- Then we can work with it -->
<script src="index.js"></script>
</body>
</html>