Closed UroosaSania closed 2 years ago
Not sure if it will help, but I was getting 0Kb files when I neglected to put the Await command in front of pgp.EncryptFileAsync(inputFile, encryptedfile)
Without the Await command, the code was racing ahead and closing the file stream before the encryption was completed.
I am reading PGP files from a folder, iteratively in a loop and feeding each file to the asynchronous method DecryptFileAsync(inputFile, outputFile) for decryption. When the input folder has more than one file, the decryption works flawlessly, however, when there is only one file in the input folder, the method returns an empty (0KB) file in the target location. Note that I am using async-await to call the method DecryptFileAsync(inputFile, outputFile). Can you please offer a solution?