diff --git a/creator/index.html b/creator/index.html index 77d7410..293ff34 100644 --- a/creator/index.html +++ b/creator/index.html @@ -1,378 +1,363 @@ - - + + - - -

Portable Secret: Secret Creator

-

- This tool runs entirely in your browser window. The secret never leaves your computer!
- But don't take my word for it. Check out the source code! -

- - - -
- Salt: 0x - - -
- IV: 0x - - + + function hexStringToBytes(input) { + // TODO accepts invalid (non-hex) values, e.g. ZZZZ + for (var bytes = [], c = 0; c < input.length; c += 2) { + bytes.push(parseInt(input.substr(c, 2), 16)); + } + return Uint8Array.from(bytes); + } + + function setInputType(selectedType) { + selectedInputType = selectedType; + + for (let type in inputElementIds) { + let element = document.getElementById(inputElementIds[type]) + if (type == selectedType) { + element.hidden = false + } else { + element.hidden = true + } + } + + setMessage("Ready to encrypt 👍") + } + + + + +

Portable Secret: Secret Creator

- Salt and IV are random input coming straight from your browser's Random Number Generator. Do not reuse across messages. + This tool runs entirely in your browser window. The secret never leaves your computer!
+ But don't take my word for it. Check out the source code!

-
- -
- Password:
- -
- - -
- Password hint:
- -
- - - -
- - - - - - -
- - - - - - - - - -
- - -
-
- -
- - - -
- Show ciphertext + + + +
+ Salt: 0x + + +
+ IV: 0x + + +

+ Salt and IV are random input coming straight from your browser's Random Number Generator. Do not reuse across messages. +

+
+ +
+ Password:
+ +
+ + +
+ Password hint:
+ +
+ + + +
+ + + + + + +
+ + + + + + + + + +
+ + +
- +
-
+ + + +
+ Show ciphertext +
+ +
+
+ + + - + \ No newline at end of file diff --git a/creator/secret-template.html b/creator/secret-template.html index dc36967..beab82e 100644 --- a/creator/secret-template.html +++ b/creator/secret-template.html @@ -1,13 +1,12 @@ - - + - + + + + secret template + + + +