Calling GnuPG in Java via a Runtime Process to encrypt and decrypt files - Decrypt always hangs

前端 未结 7 1449
隐瞒了意图╮
隐瞒了意图╮ 2021-01-18 16:25

NOTE: Coming back to this later as I\'ve been unable to find a working solution. Draining the input streams manually instead of using BufferedReaders doesn

7条回答
  •  有刺的猬
    2021-01-18 16:45

    I forget how you handle it in Java, there are 100 methods for that. But I was stuck with decrypt command itself, it was very helpful, though you didn't need all those quotes and if you wish to decrypt a large file, it goes like this:

    gpg --passphrase-fd 0 --output yourfile.txt --decrypt /encryptedfile.txt.gpg/ 0

提交回复
热议问题