-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
64 lines (60 loc) · 2.8 KB
/
index.html
File metadata and controls
64 lines (60 loc) · 2.8 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PGP Key Generator & Encrypt/Decrypt</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.jsdelivr.net/npm/openpgp@5.5.0/dist/openpgp.min.js"></script>
<script src="script.js" defer></script>
</head>
<body>
<div class="main-container">
<h1>PGP Tool</h1>
<div class="menu">
<button onclick="showSection('generate')">Generate Keys</button>
<button onclick="showSection('encrypt')">Encrypt Message</button>
<button onclick="showSection('decrypt')">Decrypt Message</button>
</div>
<div id="generate" class="section" style="display: none;">
<h2>Generate Random PGP Keys</h2>
<button onclick="generateKeys()">Generate Keys</button>
<p>Public Key:</p>
<div class="copy-container">
<textarea id="publicKey" readonly></textarea>
<button onclick="copyToClipboard('publicKey')">Copy</button>
</div>
<p>Private Key:</p>
<div class="copy-container">
<textarea id="privateKey" readonly></textarea>
<button onclick="copyToClipboard('privateKey')">Copy</button>
</div>
</div>
<div id="encrypt" class="section" style="display: none;">
<h2>Encrypt Message</h2>
<textarea id="messageToEncrypt" placeholder="Enter message here..."></textarea>
<textarea id="encryptPublicKey" placeholder="Enter public key here..."></textarea>
<button onclick="encryptMessage()">Encrypt</button>
<p>Encrypted Message:</p>
<div class="copy-container">
<textarea id="encryptedMessage" readonly></textarea>
<button onclick="copyToClipboard('encryptedMessage')">Copy</button>
</div>
</div>
<div id="decrypt" class="section" style="display: none;">
<h2>Decrypt Message</h2>
<textarea id="messageToDecrypt" placeholder="Enter encrypted message here..."></textarea>
<textarea id="decryptPrivateKey" placeholder="Enter private key here..."></textarea>
<button onclick="decryptMessage()">Decrypt</button>
<p>Decrypted Message:</p>
<div class="copy-container">
<textarea id="decryptedMessage" readonly></textarea>
<button onclick="copyToClipboard('decryptedMessage')">Copy</button>
</div>
</div>
</div>
<footer class="footer">
<p>Made by <a href="https://ekas.link" target="_blank">EKA</a></p>
</footer>
</body>
</html>