forked from JaydaJ1/KAJJ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
login2.html
77 lines (69 loc) · 2.89 KB
/
login2.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="./styles.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jsSHA/2.0.2/sha.js"></script>
<title>Document</title>
</head>
<body>
<nav>
<h4>KAJJ ACADEMY</h4>
<ul>
<li><a href="/">HOME</a></li>
<li><a href="/login">LOGIN</a></li>
<li><a href="/register">REGISTER</a></li>
</ul>
</nav>
<div class="container mt-4">
<div class="card">
<div class="card-header">
Register Form
</div>
<div class="card-body">
<form action="/login" method="POST">
<div class="form-group">
<label for="name">Enter Username</label>
<input type="text" class="form-control" id="name" name="name">
</div>
<div class="form-group">
<label for="password" class="form-label">Enter Password Here</label>
<input type="password" class="form-control" id="password" name="password">
</div>
<div class="form-group">
<label for="passwordConfirm" class="form-label">Confirm Password</label>
<input type="password" class="form-control" id="passwordConfirm" name="passwordConfirm">
</div>
<button onclick="mySubmit(this)" type="submit" class="btn btn-primary mt-4">Login</button>
</form>
</div>
</div>
<!-- {{#if message }}
<h4 class="alert alert-danger mt-6">{{message}}</h4>
{{/if}} -->
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
</body>
<script>
function mySubmit(obj) {
var pwdObj = document.getElementById('password');
var hashObj = new jsSHA("SHA-512", "TEXT", {numRounds: 1});
hashObj.update(pwdObj.value);
var hash = hashObj.getHash("HEX");
pwdObj.value = hash;
var pwdObj2 = document.getElementById('passwordConfirm');
var hashObj2 = new jsSHA("SHA-512", "TEXT", {numRounds: 1});
hashObj2.update(pwdObj2.value);
var hash2 = hashObj2.getHash("HEX");
pwdObj2.value = hash2;
var pwdObj3 = document.getElementById('name');
var hashObj3 = new jsSHA("SHA-512", "TEXT", {numRounds: 1});
hashObj3.update(pwdObj3.value);
var hash3 = hashObj3.getHash("HEX");
pwdObj3.value = hash3;
}
</script>
</html>