-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
125 lines (112 loc) · 5.58 KB
/
index.html
File metadata and controls
125 lines (112 loc) · 5.58 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline';">
<title>Secure Vault - Client-Side Encryption</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<header class="header">
<div class="header-content">
<h1>🔐 Secure Vault</h1>
<p class="subtitle">AES-256-GCM Client-Side Encryption</p>
</div>
<div class="security-badge">
<span class="badge-icon">🛡️</span>
<span class="badge-text">Security+</span>
</div>
</header>
<main class="main-content">
<!-- Security Status Panel -->
<div class="status-panel" id="statusPanel">
<div class="status-item">
<span class="status-label">Encryption:</span>
<span class="status-value" id="encryptionStatus">Standby</span>
</div>
<div class="status-item">
<span class="status-label">Key Strength:</span>
<span class="status-value" id="keyStrength">N/A</span>
</div>
<div class="status-item">
<span class="status-label">File Validation:</span>
<span class="status-value" id="validationStatus">Pending</span>
</div>
</div>
<!-- Upload Section -->
<section class="upload-section">
<h2>File Upload & Encryption</h2>
<div class="form-group">
<label for="fileInput">Select File (Max 5MB)</label>
<div class="file-input-wrapper">
<input type="file" id="fileInput" accept=".txt,.pdf,.jpg,.jpeg,.png,.doc,.docx" />
<div class="file-info" id="fileInfo">No file selected</div>
</div>
</div>
<div class="form-group">
<label for="passwordInput">Encryption Password</label>
<div class="password-wrapper">
<input type="password" id="passwordInput" placeholder="Enter strong password (min 12 chars)" />
<button type="button" class="toggle-password" id="togglePassword">👁️</button>
</div>
<div class="password-strength" id="passwordStrength"></div>
</div>
<div class="form-group">
<label for="confirmPasswordInput">Confirm Password</label>
<input type="password" id="confirmPasswordInput" placeholder="Re-enter password" />
</div>
<button class="btn-primary" id="encryptBtn" disabled>
<span class="btn-icon">🔒</span>
Encrypt File
</button>
</section>
<!-- Results Section -->
<section class="results-section" id="resultsSection" style="display: none;">
<h2>Encryption Results</h2>
<div class="result-card">
<h3>Encryption Metadata</h3>
<div class="metadata-grid">
<div class="metadata-item">
<span class="metadata-label">Algorithm:</span>
<span class="metadata-value" id="algorithm">AES-GCM-256</span>
</div>
<div class="metadata-item">
<span class="metadata-label">IV Length:</span>
<span class="metadata-value" id="ivLength">12 bytes</span>
</div>
<div class="metadata-item">
<span class="metadata-label">Salt Length:</span>
<span class="metadata-value" id="saltLength">16 bytes</span>
</div>
<div class="metadata-item">
<span class="metadata-label">PBKDF2 Iterations:</span>
<span class="metadata-value" id="iterations">100,000</span>
</div>
</div>
</div>
<div class="result-card">
<h3>Encrypted Data Preview</h3>
<textarea class="encrypted-output" id="encryptedOutput" readonly></textarea>
<button class="btn-secondary" id="downloadBtn">
<span class="btn-icon">⬇️</span>
Download Encrypted File
</button>
</div>
<button class="btn-reset" id="resetBtn">Reset Vault</button>
</section>
<!-- Security Log -->
<section class="log-section">
<h3>Security Audit Log</h3>
<div class="log-container" id="logContainer"></div>
</section>
</main>
<footer class="footer">
<p>🔐 All encryption occurs client-side. No data leaves your browser.</p>
<p class="footer-note">Built with Web Crypto API (NIST SP 800-38D compliant)</p>
</footer>
</div>
<script src="script.js"></script>
</body>
</html>