I have a Java application which gets GnuPG encrypted files from a remote machine and I need to decrypt and process them. Then I need to encrypt output files and send it to remote machine.
At first I tried gnupg-for-java
(https://github.com/guardianproject/gnupg-for-java). It works, but it prompts me for passwords to decrypt file and to sign encrypted file. In documentation there is "With GnuPG 2.x, gpg-agent will handle prompting the user for the passphrase, as well as passphrase caching."
Do you know how can I provide password without prompting user?