Projects STRLCPY link-lock Commits 379ec5a0
🤬
  • ■ ■ ■ ■ ■ ■
    create/create.js
    skipped 149 lines
    150 150   output.blur();
    151 151  }
    152 152   
     153 + 
     154 +// Activated when a user tries to disable randomization of the IV -- adds a
     155 +// scary warning that will frighten off anyone with common sense, unless they
     156 +// desperately need the URL to be a few characters shorter.
     157 +function onIvCheck(checkbox) {
     158 + if (!checkbox.checked) {
     159 + checkbox.checked = !confirm("Please only disable initialization vector "
     160 + + "randomization if you know what you are doing. Disabling this is "
     161 + + "detrimental to the security of your encrypted link, and it only "
     162 + + "saves 20-25 characters in the URL length.\n\nPress \"Cancel\" unless "
     163 + + "you are very sure you know what you are doing.");
     164 + }
     165 +}
     166 + 
  • ■ ■ ■ ■
    create/index.html
    skipped 104 lines
    105 105   <div class="advanced" id="advanced">
    106 106   <div class="labeled-input">
    107 107   <label for="iv">random initialization vector</label>
    108  - <input type="checkbox" id="iv" checked />
     108 + <input type="checkbox" id="iv" onclick="onIvCheck(this)" checked />
    109 109   </div>
    110 110   <div class="labeled-input">
    111 111   <label for="salt">random salt</label>
    skipped 26 lines
Please wait...
Page is in error, reload to recover