Skip to content

Commit a820780

Browse files
authored
Merge pull request #50 from op-amateur/newb
initial commit
2 parents f2353ec + f85fe40 commit a820780

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

Password generator/index.html

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<html>
2+
<head>
3+
<title>Password generator</title>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<!-- MD5 hashing function -->
8+
<script src="https://thecode.media/wp-content/uploads/2019/05/js-md5.js"></script>
9+
<style type="text/css">
10+
body
11+
{
12+
text-align: center;
13+
margin: 10;
14+
font-family: Verdana, Arial, sans-serif;
15+
font-size: 16px;
16+
}
17+
input
18+
{
19+
display: inline-block;
20+
margin: 20px auto; border: 2px solid #4a1079;
21+
padding: 10px 20px;
22+
font-family:Verdana, Arial, sans-serif;
23+
font-size: 16px;
24+
}
25+
</style>
26+
</head>
27+
<body>
28+
<div class="container" margin: auto;">
29+
<h2 class="todo__caption">Password generator</h2>
30+
<br>
31+
<input type="text" id="site_url" size="50" placeholder="Where do you need this password? Paste the address">
32+
<br>
33+
<input type="text" id="keyword" size="50" placeholder="Some key word here">
34+
<br> <br>
35+
<button style="font-size: 100%; padding:5px 10px 10px 10px" onclick="generate()">Generate password</button>
36+
<p>Your password is:</p>
37+
<div id = "pass_text" style="font-weight: bold"></div>
38+
</div>
39+
<script>
40+
var site, salt;
41+
var text, password;
42+
function generate()
43+
{
44+
site = document.getElementById('site_url').value;
45+
salt = document.getElementById('keyword').value;
46+
text = site + salt + 'Practicum Rules';
47+
password = md5(text);
48+
document.getElementById('pass_text').innerHTML=password;
49+
}
50+
</script>
51+
</body>
52+
</html>

0 commit comments

Comments
 (0)