-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
31 lines (31 loc) · 1.08 KB
/
index.html
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
<html>
<head>
<title>hscrypt demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body { font-size: 2vw }
h1 { font-size: 3vw }
pre { background-color: #f2f2f2 }
</style>
<script>
function decrypt() {
const pswd = document.getElementById("password")?.value
console.log("Decrypt using password:", pswd)
hscrypt.decrypt(pswd)
return false
}
</script>
</head>
<body>
<div id="container">
<h1>This page is password protected.</h1>
<p>
<form method="post" action="javascript:void(0);" onsubmit="decrypt()">
<input id="password" type="password" placeholder="Enter password" autofocus ></input>
</form>
<p>Hint: the password for this page is <code>my-password</code> 😉</p>
<p>You can also enter it as a "URL hash", e.g. <a href="#my-password"><code>#my-password</code></a>)</p>
<p><a target="_blank" href="https://github.com/hscrypt/demos/tree/main/01-api">View source on GitHub</a></p>
</div>
</body>
</html>