-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
114 lines (113 loc) · 4.32 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Text Encryption</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="assets/style.css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="jumbotron">
<div class="container text-center">
<h1>Text Encryption</h1>
</div>
</div>
<hr>
<!-- Encrypt Text -->
<div class="row">
<div class="col-lg-6">
<h1>Encrypt Text</h1>
<form id="encrypt_data">
Key:<br>
<textarea cols="50" rows="1"></textarea><br>
Plain Text:<br>
<textarea cols="50" rows="8"></textarea><br>
</form>
<button onclick="encryptText()"><b>Encrypt</b></button>
</div>
<div class="col-lg-6">
<h1>Result</h1>
<p id="encrypt_result"></p>
</div>
</div>
<hr>
<!-- Decrypt Text -->
<div class="row">
<div class="col-lg-6">
<h1>Decrypt Text</h1>
<form id="decrypt_data">
Key: <br>
<textarea rows="1" cols="50"></textarea><br>
Cipher Text: <br>
<textarea rows="8" cols="50"></textarea><br>
</form>
<button onclick="decryptText()"><b>Decrypt</b></button>
</div>
<div class="col-lg-6">
<h1>Result</h1>
<p id="decrypt_result"></p>
</div>
</div>
<hr>
<!-- Validate Key -->
<div class="row">
<div class="col-lg-12">
<h1>Validate Key</h1>
<form id="validate_keys">
Key: <br>
<textarea rows="1" cols="50"></textarea><br>
</form>
<button onclick="validateKey()"><b>Check</b></button>
<p class="mapping">Decrypted: A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z</p>
<p class="mapping" id="letter_mapping">Encrypted: </p>
</div>
</div>
<hr>
<!-- Generate Key -->
<div class="row">
<div class="col-lg-12">
<h1>Generate Key</h1>
</div>
<div class="col-lg-6">
<h2>Random Key</h2>
<button onclick="generateRandomKey()"><b>Generate</b></button>
<p>Key:</p>
<p id="random_key"> </p>
</div>
<div class="col-lg-6">
<h2>Known Mapping</h2>
<p>Enter the mapping in the following format: <br>
<i>D,E,V,L,J,B,Z,S,X,C,Q,M,G,N,I,F,R,W,T,A,U,P,H,O,Y,K</i><br>
where A maps to D, B maps to E, etc.
</p>
<form id="generate_key">
<textarea rows="1" cols="50"></textarea><br>
</form>
<button onclick="generateKey()"><b>Generate</b></button>
<p>Key:</p>
<p id="known_key"> </p>
</div>
</div>
<!-- Footer -->
<div class="row justify-content-evenly footer">
<div class="col-lg-3">
<a href="https://github.com/RoryPoulter/Web-Encryption-Program">Fork Me!</a>
</div>
<div class="col-lg-3">
<p>Rory Poulter <a href="https://github.com/RoryPoulter/">
<i class="fa fa-github"></i>
</a>
<a href="https://linkedin.com/in/rory-poulter/">
<i class="fa fa-linkedin"></i>
</a></p>
</div>
</div>
<!-- Script -->
<script src="assets/main.js"></script>
</body>
</html>