-
Notifications
You must be signed in to change notification settings - Fork 6
/
sha256.php
38 lines (28 loc) · 918 Bytes
/
sha256.php
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
<html>
<head>
<script src="js/jquery/jquery.js"></script>
<script src="js/lib/BigInteger.js"></script>
<script src="js/lib/Sha256.js"></script>
<script src="js/lib/Utils.js"></script>
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/spacing.css">
<script>
$(document).ready(function(){
var sha256generator = new Sha256();
$("#sha_key_submit").click(function(){
var shaStringVal = $("#shaString").val();
var bytes = Utils.stringToBytes(shaStringVal);
$("#shaResult").html(sha256generator.generate(bytes));
});
});
</script>
</head>
<body>
<div class="padding">
<h1 class="margin_0_top">Sha256 Example</h1>
<input style="width:100%;padding:5px;" type="text" value="" placeholder="Enter your string here" name="shaString" id="shaString" /><br/>
<input type="submit" value="Generate" id="sha_key_submit" />
<div id="shaResult"></div>
</div>
</body>
</html>