-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·28 lines (27 loc) · 1.3 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
<html>
<head>
<title>sha256</title>
<style type="text/css">
body {
font-family: verdana, sans-serif;
font-size: 12px;
}
</style>
<script type="text/javascript" src="sha256.js"></script>
<script type="text/javascript" src="enc-base64-min.js"></script>
</head>
<body>
<form action="" onSubmit="return false;">
<div><strong>Data</strong></div>
<div>
<input type="password" name="source" style="width: 716px; border-width: 1px; padding: 5px" onkeyup="var hash= CryptoJS.SHA256(this.form.source.value); this.form.result.value =hash.toString(CryptoJS.enc.Base64);"/>
</div>
<div><strong>SHA-256 hash</strong></div>
<div><p style="width: 716px; border-width: 1px; margin: 0px 0px 0px 0px; padding-left: 5px; font-family: courier;font-size: 14px;">12345678901234567890123456789012345678901234567890123456789012345678901234567890</p></div>
<div><input type="text" name="result" style="width: 716px; border-width: 1px; padding-left: 5px; font-family: courier" /></div>
<div>
<input type="button" value="Calculate SHA256 hash" style="width: 200px; border-width: 1px; padding: 5px;" onclick="var hash= CryptoJS.SHA256(this.form.source.value); this.form.result.value =hash.toString(CryptoJS.enc.Base64); this.form.result.select(); this.form.result.focus();" />
</div>
</form>
</body>
</html>