*Ensure we only store the 32 byte private key
This commit is contained in:
parent
2e15a16faa
commit
91cd5504c7
|
@ -1136,7 +1136,7 @@
|
||||||
const vals = new Uint8Array(crypto_sign_SEEDBYTES);
|
const vals = new Uint8Array(crypto_sign_SEEDBYTES);
|
||||||
crypto.getRandomValues(vals)
|
crypto.getRandomValues(vals)
|
||||||
const [kp] = ed25519KeypairFromEntropy(vals);
|
const [kp] = ed25519KeypairFromEntropy(vals);
|
||||||
let keyStr = bufToHex(kp.secretKey);
|
let keyStr = bufToHex(kp.secretKey.slice(0, kp.secretKey.length/2));
|
||||||
window.localStorage.setItem("v1-key", keyStr)
|
window.localStorage.setItem("v1-key", keyStr)
|
||||||
if (window.opener) {
|
if (window.opener) {
|
||||||
window.close()
|
window.close()
|
||||||
|
|
Reference in New Issue