Remove key

This commit is contained in:
Dan Seripap 2016-01-08 20:44:00 -05:00
parent 44afb443ab
commit 35dc549e3d
2 changed files with 10 additions and 1 deletions

View File

@ -23,6 +23,7 @@ $(function() {
var $inputMessage = $('.inputMessage'); // Input message input box
var $key = $('#key');
var $genKey = $('#new_key');
var $removeKey = $('#remove_key');
var $chatPage = $('.chat.page'); // The chatroom page
@ -260,6 +261,10 @@ $(function() {
$key.val(key);
});
$removeKey.click(function(() {
$key.val('');
});
// Socket events
// Whenever the server emits 'login', log the login message

View File

@ -33,7 +33,11 @@
<div class="modal-body">
<p>This chat encryption key is randomly generated by every client. Clients must use the same chat key to decrypt chat messages. This key is <strong>NOT STORED</strong> nor transmitted to the server. Regardless if the room URL was shared, chat messages will appear as hash values until the same key is used between clients. You may change the key as many times as you want.</p>
<div class="form-group">
<button id="new_key" class="form-control btn btn-info btn-xs">Generate new key</button>
<button id="new_key" class="btn btn-info btn-xs">Generate new key</button>
<button id="remove_key" class="btn btn-danger btn-xs">Remove Key*</button>
</div>
<div class="form-group">
<center><small>*<strong>Warning</strong>: If there is no key specified, anyone with the chat url will be able to see decrypted messages.</small></center>
</div>
<div class="form-group">
<textarea id="key" class="form-control" rows="5" placeholder="Enter key here"></textarea>