![]() String fileName = (f.getName()).substring(0,(f.getName()).length()-4) Ĭmd = "-output D:\\AutoDecrypt_Feeds\\feed\\"+f.getName()+" -passphrase 123 -symmetric D:\\AutoDecrypt_Feeds\\feed\\"+fileName taking feed files and decrypting them one by one all file with gpg extension will be stored in this arrayįile allGpgFiles = encryptedFileLocation.listFiles(decrypterObj.new GpgFileFilter()) īuilder.directory(encryptedFileLocation) Process p = runtime.exec(cmd, null, keyFileLocation) ĪutoDecrypter decrypterObj = new AutoDecrypter() ĭecrypterObj.displa圜ommandPromptOutput(p) ProcessBuilder builder = new ProcessBuilder(cmd) Here is my java code private void decryptFiles(String encryptedFilePath, String keyFilePath) So is there exist a command through which I can enter passphrase without getting the prompt. ![]() What I want to achieve is to avoid this prompt, to automate decryption process in my java code. Gpg -allow-secret-key-import -import PrivateKey.gpg On successful execution it gives a prompt to enter passphrase. The java code reads PGP files from a directory, after that it imports private key and executes gpg filename.gpg command. This batch file is executing a java CLass file. I have created a SSIS package, which is using a Execute Process task, Inside this task a batch file is getting executed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |