-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
77 lines (68 loc) · 2.63 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ghetto HSM</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/sandstone/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style type="text/css">
body {
padding-top: 50px;
}
</style>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Ghetto HSM <i class="fa fa-key"></i></a>
</div>
</div>
</nav>
<div class="container">
<h3>Provide a value to encrypt/decrypt...</h3>
<form>
<div class="form-group">
<label for="txtValue">Value:</label>
<textarea class="form-control" id="txtValue"></textarea>
</div>
<div class="form-group">
<label for="txtResult">Result:</label>
<textarea class="form-control" id="txtResult" disabled></textarea>
</div>
<div class="form-group">
<button type="button" class="btn btn-lg btn-danger" id="btnEncrypt">Encrypt</button>
<button type="button" class="btn btn-lg btn-success" id="btnDecrypt">Decrypt</button>
</div>
</form>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(function() {
$('#btnEncrypt').click(function() {
$.post( "hsm/encrypt", function( data ) {
$('#txtResult').val(data);
});
});
$('#btnDecrypt').click(function() {
$.post( "hsm/decrypt", function( data ) {
$('#txtResult').val(data);
});
});
});
</script>
</body>
</html>