Skip to content

openpgp.decrypt outputs serialized decimal bytes, instead of the raw bytes. #1471

Answered by twiss
Mellywins asked this question in Q&A
Discussion options

You must be logged in to vote

Probably it comes from this code, when encrypting:

    message: await opengpg.createMessage({text: sourceStream}),

You're saying here that the input stream is text, so it gets treated as a string. That's where the toString comes from.

Try

    message: await opengpg.createMessage({binary: sourceStream}),

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Mellywins
Comment options

Answer selected by Mellywins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1470 on January 31, 2022 13:03.