Update README.md: Fix error
I was seeing this error: ``` index.js:29 message: await openpgp.message.readArmored(encrypted), // parse armored message ^^^^^^^ ``` And I think it's because the async was missing.
This commit is contained in:
parent
1ec216a6b4
commit
bd964334cd
|
@ -184,7 +184,7 @@ const encryptDecryptFunction = async() => {
|
||||||
encrypted = ciphertext.data // '-----BEGIN PGP MESSAGE ... END PGP MESSAGE-----'
|
encrypted = ciphertext.data // '-----BEGIN PGP MESSAGE ... END PGP MESSAGE-----'
|
||||||
return encrypted
|
return encrypted
|
||||||
})
|
})
|
||||||
.then(encrypted => {
|
.then(async encrypted => {
|
||||||
const options = {
|
const options = {
|
||||||
message: await openpgp.message.readArmored(encrypted), // parse armored message
|
message: await openpgp.message.readArmored(encrypted), // parse armored message
|
||||||
publicKeys: (await openpgp.key.readArmored(pubkey)).keys, // for verification (optional)
|
publicKeys: (await openpgp.key.readArmored(pubkey)).keys, // for verification (optional)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user