-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
66 lines (54 loc) · 2.34 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<link rel="stylesheet" href="styles.css">
<link rel="shortcut icon" type="image/x-icon" href="https://1000logos.net/wp-content/uploads/2021/04/Batman-Logo.png" />
<title>Bat-Encrypter</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/pbkdf2.js"></script>
</head>
<body>
<div class="login">
<figure class="avatar">
<img src="https://1000logos.net/wp-content/uploads/2021/04/Batman-Logo.png" alt="Avatar" class="avatar__image" width="100" height="60">
<figcaption class="avatar__name" style="font-size:30px;">Bat - Encrypter</figcaption>
</figure>
<form class="form">
<div class="input">
<labe class="input__label">Email</labe>
<input type="email" class="input__email" id="userEmail" placeholder="me@mail.com">
</div>
<div class="input">
<labe class="input__label">Password</labe>
<input type="password" class="input__password" id="userPassword" placeholder="····">
</div>
</form>
<button class="form__button" onclick="encrypt();">Log in</button>
</div>
<button id="hello" onclick="sourceCode();">Source Code</button>
<script>
function encrypt() {
var inputEmail = document.getElementById("userEmail").value;
var input = document.getElementById("userPassword").value;
console.log("User Email ID:",inputEmail);
console.log("User Password:",input);
// Encryption
var encrypted=CryptoJS.AES.encrypt(input, "secret-key").toString()
// Decryption
var decrypted=CryptoJS.AES.decrypt(encrypted, "secret-key").toString(CryptoJS.enc.Utf8)
console.log("Encrypted Password: "+ encrypted)
console.log("Decrypted Value: "+ decrypted)
}
function sourceCode() {
window.location.href = 'https://github.com/Akash-Ramjyothi/Bat-Encrypter';
}
/*
var encrypted=CryptoJS.AES.encrypt("Akash", "secret-key").toString()
var decrypted=CryptoJS.AES.decrypt(encrypted, "secret-key").toString(CryptoJS.enc.Utf8)
console.log("Encrypted: "+ encrypted)
console.log("Decrypted: "+ decrypted)
*/
</script>
</body>
</html>