Display generated key material in the output fields

parent e600cd1e
......@@ -28,7 +28,7 @@
<input type='text' id='nonce'>
<label for='publicKey'>Public key:</label>
<textarea id='publicKey'></textarea>
<input type='text' id='publicKey'>
<label for='privateKey'>Private key:</label>
<textarea id='privateKey'></textarea>
......@@ -43,9 +43,17 @@
const form = event.target
const password = form.elements.password.value
const keys = new Keys(password)
const keys = new Keys(password).keysObject
console.log(keys)
const saltTextField = document.getElementById('salt')
const nonceTextField = document.getElementById('nonce')
const publicKeyTextField = document.getElementById('publicKey')
const privateKeyTextArea = document.getElementById('privateKey')
saltTextField.value = keys.salt
nonceTextField.value = keys.nonce
publicKeyTextField.value = keys.publicKey
privateKeyTextArea.value = keys.privateKey
event.preventDefault()
})
......
......@@ -39,7 +39,7 @@ input, textarea {
}
#outputForm textArea {
height: 7em;
height: 4em;
background-color: white;
color: black;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment