This repository has been archived by the owner on May 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
public.html
168 lines (138 loc) · 5.12 KB
/
public.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<!DOCTYPE html>
<html lang="en-GB">
<head>
<link rel="preload" href="https://fhpwa.github.io/fonts/FiraSansNF.woff2" as="font" type="font/woff2">
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="https://fhpwa.github.io/css/main.css">
<script>
if ("serviceWorker" in navigator) {
navigator.serviceWorker.register("/blackc4t/sw.js", { scope: "/blackc4t/" });
}
/* read data from local storage and set css vars*/
let settingData = JSON.parse(localStorage.getItem('com.fredhappyface'));
const rootStyles = document.styleSheets[0].cssRules[0].style;
const darkStyles = document.styleSheets[0].cssRules[1].cssRules[0].style;
rootStyles.setProperty("--text-mod", (settingData.textSize.size ? settingData.textSize.size : "1"))
if (settingData.theme.name !== "auto"){
rootStyles.setProperty("--var-c-primary", (settingData.theme.cPrimary ? settingData.theme.cPrimary : "#FAFAFA"))
rootStyles.setProperty("--var-c-secondary", (settingData.theme.cSecondary ? settingData.theme.cSecondary : "#EAEAEB"))
rootStyles.setProperty("--var-c-text", (settingData.theme.cText ? settingData.theme.cText : "#383A42"))
darkStyles.setProperty("--var-c-primary", (settingData.theme.cPrimary ? settingData.theme.cPrimary : "#181A1F"))
darkStyles.setProperty("--var-c-secondary", (settingData.theme.cSecondary ? settingData.theme.cSecondary : "#282C34"))
darkStyles.setProperty("--var-c-text", (settingData.theme.cText ? settingData.theme.cText : "#ABB2BF"))
rootStyles.setProperty("--var-c-black", (settingData.theme.cBlack ? settingData.theme.cBlack : "0"))
}
</script>
<meta name="Description" content="Author: FredHappyface; Cost: Free">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!--Android app icon-->
<link rel="manifest" href="/blackc4t/manifest.json">
<meta name="theme-color" content="#282C34" />
<!--iOS touch icon-->
<link rel="apple-touch-icon" sizes="180x180" href="images/appicons/square-180.png">
<!--Bookmark, Browser favicon-->
<link rel="icon" type="image/png" sizes="256x256" href="images/appicons/squircle-256.png">
<link rel="icon" type="image/png" sizes="32x32" href="images/appicons/squircle-256.png">
<!--Windows 8, 10 tile -->
<meta name="msapplication-TileColor" content="#282C34">
<meta name="msapplication-TileImage" sizes="150x150" content="images/appicons/square-180.png">
<meta name="msapplication-starturl" content="/blackc4t/">
<!--Title-->
<title>Public Key Cryptography</title>
</head>
<body>
<div class="section--nav-bar c-app-bar--blackc4t">
<div class="app-bar">
<div class="section__content">
<div class="left">
<h1>BlackC4t</h1>
</div>
<div class="pair right">
<a href="https://fhpwa.github.io/home/info.html">
<h1></h1>
</a>
<a href="https://fhpwa.github.io/home/settings.html">
<h1></h1>
</a>
</div>
</div>
</div>
<nav id="js-nav">
<ul class="nav__content" id="js-nav__content">
<li>
<a href="index.html" >One Key</a>
</li>
<li>
<a href="2kotp.html" >Two Key</a>
</li>
<li>
<a href="password.html" >Password Generator</a>
</li>
<li>
<a href="public.html" class="current">Public Key Cryptography</a>
</li>
</ul>
<a class="overflow" id="js-overflow">More...</a>
<ul class="nav__overflow" id="js-nav__overflow">
</ul>
</nav>
</div>
<div class="buffer--nav-bar">
</div>
<div id="js-toast" >
<div><p id="js-toast__text" class="c-toast"></p></div>
</div>
<div class="section c-secondary">
<div class="section__content">
<div class="img--scale left" style="width: 4.5em;">
<img src="images/appicons/squircle-256.png" alt="BlackC4t">
</div>
<h1>Public Key</h1>
</div>
</div>
<div class="section c-primary">
<div class="section__content">
<form>
<label for="input">
Message:
</label>
<textarea placeholder="Input Message" rows="4" cols="1" id="input"></textarea>
Encrypt or Decrypt:
<label class="css-radio" for="encrypt">
Encrypt text
<input type="radio" name="var" value="1" id="encrypt" checked="checked">
<span class="check-mark"></span>
</label>
<label class="css-radio" for="decrypt">
Decrypt text
<input type="radio" name="var" value="2" id="decrypt">
<span class="check-mark"></span>
</label>
<label for="mod">
Modulus:
</label>
<input type="number" placeholder="Input Modulus" id="mod">
<label for="public">
Public Key Exponent:
</label>
<input type="number" placeholder="Input Public Key" id="public">
<label for="private" onclick="showPrivate()" id="privatelabel">
Click to Show Private Key Exponent...
</label>
<input type="number" placeholder="Input Private Key" id="private">
<label for="output">
Output:
</label>
<textarea rows="4" cols="1" id="output"></textarea>
</form>
<div class="pair">
<button onclick="start()"> Run</button>
<button onclick="copy()"> Copy Output </button>
</div>
</div>
</div>
<script src="scripts/public.js"></script>
<script src="https://fhpwa.github.io/scripts/script.js"></script>
<script src="https://fhpwa.github.io/scripts/navbar.js"></script>
</body>
</html>