-
I cannot find any previous mention of this bug, it could be me just being stupid but either way I think it is probably best to report it.
Issue : e.isPrivate is not a functionTraceback
the following is the code that causes this issue, (notice, the private and public keys arent used for anything so I dont see that leaving them in should cause any issues)
Unsure how to progress from here any advice would be appreciated |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @NxtDaemon, the const publicKey = await openpgp.readKey({ armoredKey: publicKeyArmored });
const privateKey = await openpgp.decryptKey({
privateKey: await openpgp.readPrivateKey({ armoredKey: privateKeyArmored }),
passphrase: ... // this is required
}); |
Beta Was this translation helpful? Give feedback.
Hi @NxtDaemon, the
openpgp
functions you are calling return promises, so you need toawait
them. The error you are seeing is thrown byopenpgp.decryptKey
as a result. Note that you are also missing thepassphrase
option for key decryption: