-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
59 lines (42 loc) · 898 Bytes
/
index.html
File metadata and controls
59 lines (42 loc) · 898 Bytes
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
<!doctype html>
<html>
<head>
<title>One Time Pad</title>
<script type="text/javascript" src="onetimepad.js"></script>
<style>
body {
text-align:center;
font-family: OpenSans, Arial, sans-serif;
}
#main {
margin:50px auto;
max-width:500px;
padding:25px;
border-radius:5px;
border:1px solid lightgrey;
}
</style>
</head>
<body>
<div id="main">
<p>One-time pad simulator using JS</p>
If key is same length as message,
will encrypt using the key. Otherwise generates a new key.
If you encrypt using the cipher and the corresponding key,
the algorithm will decrypt the cipher into the message.
<p>
<strong>Msg: </strong>
<input id="message"></input>
</p>
<p>
<strong>Key: </strong>
<input id="key"></input>
</p>
<p>
<button onclick="javascript:generate();">Encode</button>
</p>
<h4>Ciphertext:</h4>
<div id="cipher"></div>
</div>
</body>
</html>