-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpassword.html
78 lines (78 loc) · 3.3 KB
/
password.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
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
<!DOCTYPE html>
<html lang="en" class="d-flex h-100">
<head>
<meta charset="UTF-8">
<title>Password Generator</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>⚙️</text></svg>">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<link href="theme.css" rel="stylesheet" />
<script type="module" src="darkModeSupport.js" defer></script>
<script type="module" src="password.js" defer></script>
</head>
<body class="flex-fill d-flex">
<div class="flex-fill container d-flex flex-column p-3">
<nav aria-label="breadcrumb">
<ol class="breadcrumb mb-4">
<li class="breadcrumb-item"><a href="index.html">Web shorts</a></li>
<li class="breadcrumb-item active" aria-current="page">
Password Generator
</li>
</ol>
</nav>
<p class="mb-3">
Create a cryptographically strong password from your navigator <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API">Cryptographic API</a>
</p>
<p class="mb-3">
<strong>Warning :</strong>
Your trust toward any password given from an application or a website (even this one) should be null.
If you are insane enough to trust <a href="https://sgithub.fr.world.socgen/mturpin100217/web-shorts">my code</a>, only then you
may copy these passwords.
</p>
<form id="config" class="mb-3 row">
<div class="col">
<label id="passwordLengthLabel" for="passwordLength" class="pb-2">Password length</label>
<input id="passwordLength"
name="passwordLength"
class="form-control"
aria-labelledby="passwordLengthLabel"
type="number"
value="20"
/>
</div>
<div class="col">
<label class="pb-2">Allow special characters</label>
<div class="btn-group btn-group-toggle d-block">
<input id="special-yes" class="btn-check" type="radio" name="specials" value="true" autocomplete="off">
<label for="special-yes" class="btn btn-outline-primary">
Yes
</label><!-- Blanks are not allowed between buttons in a group
--><input id="special-no" class="btn-check" checked type="radio" name="specials" value="false" autocomplete="off"><!--
--><label for="special-no" class="btn btn-outline-primary">
No
</label>
</div>
</div>
</form>
<form id="passwordForm">
<div class="mb-3">
<label id="passwordLabel" for="password" class="pb-2">Generated password</label>
<input id="password"
name="password"
class="form-control"
aria-labelledby="passwordLabel"
readonly
style="font-family: 'Source Code Pro', 'Lucida Console', 'Courier New', monospace"
/>
</div>
<div>
<button id="copyClipboard" class="btn btn-primary">
Copy to clipboard
</button>
<button id="regenerate" class="btn btn-outline-primary">
Regenerate
</button>
</div>
</form>
</div>
</body>
</html>