Has anyone written any tutorials or have any documentation on how to use GnuPGME so I would be able to write a function such as gpgSign(std::string fileToBeSigned, std::string outPutFileName) in C++?
Has anyone written any tutorials or have any documentation on how to use GnuPGME
Share
Below is a C example with verbose comments that does what you are looking for – it is not the most direct approach, but should illustrate the how to accomplish signing a file. It does not handle selection of signers, but the GPGME docs should help you there.
You can save the file and make edits and test directly from the command line. To compile, just save as “gpgsign.c”, and execute
gcc gpgsign.c -lgpgme -o gpgsign(NOTE: you must have libgpgme installed). Then you can execute the usinggpgsign <input file> <output file>