-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkdf.html
29 lines (28 loc) · 941 Bytes
/
kdf.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
<html>
<head>
<title>KDF using SHA512</title>
<script type="text/JavaScript" src="sha512.js"></script>
<script type="text/JavaScript">
function computeHash() {
var hash = sha512(document.getElementById('salt').value
+ document.getElementById( 'key').value)
document.getElementById('key').value = ""
document.getElementById('out').innerHTML = hash
}
function clearFields() {
document.getElementById('key').value = ""
document.getElementById('out').innerHTML = ""
}
</script>
</head>
<body>
<table cellpadding="5">
<tr><td>Salt:</td><td><input type="text" id="salt" size="100"></td></tr>
<tr><td>Key: </td><td><input type="password" id="key" size="100"></td></tr>
<tr><td><input type="button" value="Compute hash!" onclick="computeHash()"></td>
<td><input type="button" value="Clear" onclick="clearFields()"></td></tr>
</table>
<h3>Output</h3>
<div id="out"></div>
</body>
</html>