-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
17 lines (17 loc) · 486 Bytes
/
Copy pathindex.html
File metadata and controls
17 lines (17 loc) · 486 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE html>
<html>
<head><title>Session Secret Generator</title></head>
<body>
<button onclick="generate()">Generate Session Secret</button>
<p id="result"></p>
<script>
function generate() {
const bytes = crypto.getRandomValues(new Uint8Array(32));
const hex = Array.from(bytes, b => b.toString(16).padStart(2,'0')).join('');
document.getElementById('result').innerText = hex;
navigator.clipboard.writeText(hex);
alert('Copied to clipboard!');
}
</script>
</body>
</html>