-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.html
187 lines (185 loc) · 5.98 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
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<!DOCTYPE html>
<!--
@author Akash Singh
@email contact@akashsingh.io
@web akashsingh.io
-->
<html>
<head>
<title>Signal Test - Browser</title>
</head>
<body>
<div class="container">
<div class="init-container">
<h1>Init</h1>
<div id="error-init-container" class="error-message" style="color: red;"></div>
<div id="success-init-container" class="success-message" style="color: green;"></div>
<label>
<span>Enter your device ID</span>
<input type="text" name="init-device-id" id="init-device-id">
</label>
<button style="margin-top: 20px;" id="init-my-identity">Initialize</button>
<label>
<span>Your registration ID (will be populated on init)</span>
<input type="text" name="init-registration-id" id="init-registration-id">
</label>
</div>
<div class="send-container">
<h1>Send</h1>
<div id="error-send-container" class="error-message" style="color: red;"></div>
<div id="success-send-container" class="success-message" style="color: green;"></div>
<div class="registration-id">
<h2>Registration ID</h2>
<label>
<span>Registration Id</span>
<input type="text" name="registration-id" id="registration-id">
</label>
</div>
<div class="identity-key">
<h2>Identity Key Packet</h2>
<label>
<span>Identity Key</span>
<input type="text" name="identity-key" id="identity-key">
</label>
</div>
<div class="signed-prekey">
<h2>Signed Prekey Packet</h2>
<label>
<span>Key Id</span>
<input type="text" name="signed-prekey-id" id="signed-prekey-id">
</label>
<label>
<span>Public Key</span>
<input type="text" name="signed-prekey-key" id="signed-prekey-key">
</label>
<label>
<span>Signature</span>
<input type="text" name="signed-prekey-signature" id="signed-prekey-signature">
</label>
</div>
<div class="prekey">
<h2>Prekey Packet</h2>
<label>
<span>Key Id</span>
<input type="text" name="prekey-id" id="prekey-id">
</label>
<label>
<span>Public Key</span>
<input type="text" name="prekey-key" id="prekey-key">
</label>
</div>
<button style="margin-top: 20px;" id="send-keys">Send</button>
</div>
<hr>
<hr>
<div class="receive-container">
<div class="request-keys-form">
<div id="error-request-keys-form" class="error-message" style="color: red;"></div>
<div id="success-request-keys-form" class="success-message" style="color: green;"></div>
<label>
<span>Registration Id</span>
<input type="text" name="request-keys-registration-id" id="request-keys-registration-id">
</label>
<label>
<span>Device Id</span>
<input type="text" name="request-keys-device-id" id="request-keys-device-id">
</label>
<button style="margin-top: 20px;" id="request-keys">Request Keys</button>
</div>
<hr>
<h1>Receive</h1>
<div id="error-process-keys-form" class="error-message" style="color: red;"></div>
<div id="success-process-keys-form" class="success-message" style="color: green;"></div>
<div class="registration-id">
<h2>Registration ID</h2>
<label>
<span>Registration Id</span>
<input type="text" name="receive-registration-id" id="receive-registration-id">
</label>
</div>
<div class="device-id">
<h2>Device ID</h2>
<label>
<span>Device Id</span>
<input type="text" name="receive-device-id" id="receive-device-id">
</label>
</div>
<div class="identity-key">
<h2>Identity Key Packet</h2>
<label>
<span>Identity Key</span>
<input type="text" name="receive-identity-key" id="receive-identity-key">
</label>
</div>
<div class="signed-prekey">
<h2>Signed Prekey Packet</h2>
<label>
<span>Key Id</span>
<input type="text" name="receive-signed-prekey-id" id="receive-signed-prekey-id">
</label>
<label>
<span>Public Key</span>
<input type="text" name="receive-signed-prekey-key" id="receive-signed-prekey-key">
</label>
<label>
<span>Signature</span>
<input type="text" name="receive-signed-prekey-signature" id="receive-signed-prekey-signature">
</label>
</div>
<div class="prekey">
<h2>Prekey Packet</h2>
<label>
<span>Key Id</span>
<input type="text" name="receive-prekey-id" id="receive-prekey-id">
</label>
<label>
<span>Public Key</span>
<input type="text" name="receive-prekey-key" id="receive-prekey-key">
</label>
</div>
<button style="margin-top: 20px;" id="parse-keys">Process</button>
</div>
<hr>
<hr>
<div class="message-container" style="display: inline-block;">
<h1>Messaging</h1>
<div id="error-messaging-form" class="error-message" style="color: red;"></div>
<div id="success-messaging-form" class="success-message" style="color: green;"></div>
<div class='contacts'>
<h3>Saved Contacts</h3>
<ul id="list-of-contacts">
<li>Unique ID: sampleDevId+sampleRegId Registration ID: sampleRegId Device ID: sampleDevId</li>
</ul>
</div>
<div class="send-fields-container">
<label>
<span>To</span>
<input type="text" name="message-to-field" id="message-to-field">
</label>
<label>
<span>Message</span>
<input type="text" name="send-plaintext" id="send-plaintext">
</label>
<button style="margin-top: 20px;" id="send-message">Send</button>
</div>
<div class="receive-fields-container">
<label>
<span>From</span>
<input type="text" name="message-from-field" id="message-from-field">
</label>
<button style="margin-top: 20px;" id="receive-message">Get Message</button>
<label>
<span>Message</span>
<input type="text" name="receive-plaintext" id="receive-plaintext">
</label>
</div>
</div>
</div>
</body>
<footer>
<script type="text/javascript" src="libsignal-protocol-javascript-master/dist/libsignal-protocol.js"></script>
<script type="text/javascript" src="util.js"></script>
<script type="text/javascript" src="store.js"></script>
<script type="text/javascript" src="index.js"></script>
</footer>
</html>