I've seen in the source code that while the "Armored" property for GpgEncrypt correctly translates to "--armor " it becomes "--clearsign" in GpgSign. If I understand it correctly, "--clearsign" and "--armor"
are not equal. When signing a file one of the following signing modes can be chosen:
Make a signature. This command may be combined with --encrypt.
Make a clear text signature.
Make a detached signature.
The "--armor" option can be added to either of these modes (although it seems to have no effect when using it with "--clearsign").
Wouldn't it be better to have an enum - say SigMode
- that's passed to GpgSign? I'm thinking of something like
public GpgSign(KeyId signatureKeyId, String fileName, String signedFileName, SignMode mode, Boolean armored)
That way even detached AND armored signatures would be possible. Exactly what I need ;) I could implement it myself, but I thought that it might be of interest for others, too.