*Ensure we only store the 32 byte private key

This commit is contained in:
Derrick Hammer 2023-04-09 19:40:29 -04:00
parent 2e15a16faa
commit 91cd5504c7
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -1136,7 +1136,7 @@
const vals = new Uint8Array(crypto_sign_SEEDBYTES);
crypto.getRandomValues(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)
if (window.opener) {
window.close()