-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
220 lines (203 loc) · 9.88 KB
/
index.html
File metadata and controls
220 lines (203 loc) · 9.88 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
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CryptoVault - Advanced Text Encryption</title>
<link rel="icon" type="image/x-icon" href="icon.ico">
<link rel="stylesheet" href="style.css">
<!-- External Libraries for Encryption -->
<script src="https://cdn.jsdelivr.net/npm/crypto-js@4.1.1/crypto-js.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jsencrypt@3.3.2/bin/jsencrypt.min.js"></script>
</head>
<body>
<!-- Animated Gradient Background -->
<div class="gradient-bg"></div>
<!-- Main Container -->
<div class="container">
<!-- Header Section -->
<header class="header glass-card">
<div class="header-content">
<div class="logo">
<span class="logo-icon">🔐</span>
<h1>CryptoVault</h1>
</div>
<button class="theme-toggle" id="themeToggle" aria-label="Toggle theme">
<span class="theme-icon sun">☀️</span>
<span class="theme-icon moon">🌙</span>
</button>
</div>
</header>
<!-- Security Warning -->
<div class="security-warning glass-card">
<span class="warning-icon">⚠️</span>
<p><strong>Security Notice:</strong> This is a demonstration app/website. Do not use for sensitive data. Keys are generated in browser/app and not stored securely.</p>
</div>
<!-- Main Content Grid -->
<div class="content-grid">
<!-- Left Section: Encryption Interface -->
<div class="main-section">
<!-- Algorithm Selector -->
<div class="algorithm-selector glass-card">
<h2>Select Encryption Algorithm</h2>
<div class="algorithm-tabs">
<button class="algo-tab active" data-algo="aes">
<span class="algo-icon">🔒</span>
<span class="algo-name">AES-256</span>
<span class="security-badge high">High Security</span>
</button>
<button class="algo-tab" data-algo="des">
<span class="algo-icon">🔓</span>
<span class="algo-name">DES</span>
<span class="security-badge low">Low Security</span>
</button>
<button class="algo-tab" data-algo="rsa">
<span class="algo-icon">🔑</span>
<span class="algo-name">RSA-2048</span>
<span class="security-badge high">High Security</span>
</button>
</div>
</div>
<!-- Input Section -->
<div class="input-section glass-card">
<div class="section-header">
<h3>Input Text</h3>
<span class="char-count" id="charCount">0 characters</span>
</div>
<textarea
id="inputText"
class="input-textarea"
placeholder="Enter text to encrypt..."
rows="6"
></textarea>
</div>
<!-- Key Management Section -->
<div class="key-section glass-card">
<div class="section-header">
<h3>Encryption Keys</h3>
<button class="btn-secondary btn-small" id="generateKeys">
<span>🔄</span> Generate New Keys
</button>
</div>
<div class="key-display" id="keyDisplay">
<!-- Keys will be displayed here dynamically -->
</div>
</div>
<!-- Action Buttons -->
<div class="action-buttons">
<button class="btn-primary" id="encryptBtn">
<span class="btn-icon">🔒</span>
<span>Encrypt</span>
</button>
<button class="btn-primary" id="decryptBtn">
<span class="btn-icon">🔓</span>
<span>Decrypt</span>
</button>
</div>
<!-- Result Section -->
<div class="result-section glass-card hidden" id="resultSection">
<div class="section-header">
<h3>Result</h3>
<div class="result-actions">
<button class="btn-icon-only" id="copyBtn" title="Copy to clipboard">
📋
</button>
<button class="btn-icon-only" id="downloadBtn" title="Download as file">
💾
</button>
</div>
</div>
<div class="result-content">
<pre id="resultText"></pre>
</div>
<div class="result-metadata" id="resultMetadata">
<!-- Metadata will be displayed here -->
</div>
</div>
</div>
<!-- Right Section: Algorithm Comparison & Metrics -->
<div class="side-section">
<!-- Performance Metrics -->
<div class="metrics-card glass-card">
<h3>Performance Metrics</h3>
<div class="metric-item">
<span class="metric-label">Current Algorithm:</span>
<span class="metric-value" id="currentAlgo">AES-256</span>
</div>
<div class="metric-item">
<span class="metric-label">Key Length:</span>
<span class="metric-value" id="keyLength">256 bits</span>
</div>
<div class="metric-item">
<span class="metric-label">Encryption Time:</span>
<span class="metric-value" id="encryptionTime">- ms</span>
</div>
<div class="metric-item">
<span class="metric-label">Security Level:</span>
<span class="metric-value" id="securityLevel">
<span class="security-badge high">High</span>
</span>
</div>
</div>
<!-- Algorithm Comparison Chart -->
<div class="comparison-card glass-card">
<h3>Algorithm Comparison</h3>
<img src="assets/comparison-chart.png"
alt="Encryption Algorithm Comparison"
class="comparison-chart">
</div>
<!-- Algorithm Info Cards -->
<div class="algo-info-cards">
<div class="info-card glass-card aes-card">
<div class="info-header">
<span class="info-icon">🔒</span>
<h4>AES-256</h4>
</div>
<p class="info-description">Industry-standard symmetric encryption, excellent for large data</p>
<div class="info-stats">
<span class="stat"><strong>Speed:</strong> Fast ⚡</span>
<span class="stat"><strong>Security:</strong> High 🛡️</span>
</div>
<p class="info-use-case"><strong>Use Case:</strong> File encryption, database encryption</p>
</div>
<div class="info-card glass-card des-card">
<div class="info-header">
<span class="info-icon">🔓</span>
<h4>DES</h4>
</div>
<p class="info-description">Legacy algorithm, vulnerable to brute-force attacks</p>
<div class="info-stats">
<span class="stat"><strong>Speed:</strong> Moderate ⏱️</span>
<span class="stat"><strong>Security:</strong> Low ⚠️</span>
</div>
<p class="info-use-case"><strong>Use Case:</strong> Educational purposes only</p>
</div>
<div class="info-card glass-card rsa-card">
<div class="info-header">
<span class="info-icon">🔑</span>
<h4>RSA-2048</h4>
</div>
<p class="info-description">Asymmetric encryption, uses public/private key pairs</p>
<div class="info-stats">
<span class="stat"><strong>Speed:</strong> Slow 🐢</span>
<span class="stat"><strong>Security:</strong> High 🛡️</span>
</div>
<p class="info-use-case"><strong>Use Case:</strong> Key exchange, digital signatures</p>
</div>
</div>
</div>
</div>
</div>
<!-- Toast Notification -->
<div class="toast hidden" id="toast">
<span class="toast-icon" id="toastIcon">✓</span>
<span class="toast-message" id="toastMessage"></span>
</div>
<!-- Loading Overlay -->
<div class="loading-overlay hidden" id="loadingOverlay">
<div class="loading-spinner"></div>
<p>Processing...</p>
</div>
<script src="app.js"></script>
</body>
</html>