In one of our projects, we implemented GPG decryption.
What is GPG ?
GPG is a complete and free implementation of the OpenPGP standard as defined by RFC4880 (also known as PGP).
We needed to import private key for decrypting a file that was encrypted using paired public key. First let’s import the required private key.
Let’s decrypt the file.
Above code has one problem. It will open a pop up for password input that has been used when public and private keys have been generated.
To support password input without pop up, we updated the code as below.
pinentry_mode option allows password input without pop up.
We did not use latest version of GPG
since it does not support
Instead, We used
which has support for this option.
is the build instruction for that.