ProtonMail / gopenpgp

A high-level OpenPGP library

Home Page:https://gopenpgp.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Option to change/disable headers PGPMessage.GetArmored() output

shoce opened this issue · comments

Would like to have output from PGPMessage.GetArmored() without any headers and could not find a way to make it.

Hello @shoce,
Are you referring to the -----BEGIN PGP MESSAGE----- armor headers?

Hello @zugzwang! No, i mean headers like the version of software that produced the output, it is placed after the "BEGIN PGP MESSAGE" and before the actual payload.

Hello @shoce, I see. The current API does not allow for that. We'll see how to integrate this, thanks for the suggestion!

Note: The armor headers still need to conform to RFC4880 sec. 6.2, in particular, only certain fields are allowed.

Hi @shoce, you can now use the GetArmoredWithCustomHeaders to change/disable the Version and Comment fields.