function PGPDecryptFile(
  inFile,  // string
  outFile, // string
  pubKey,  // string
  privKey  // string
)


This function decrypts a file using OpenPGP, the meaning of each parameter is as follows:

  • inFile: this is the full path and name to the PGP-encrypted file that you wish to decrypt
  • outFile: this is the full path and name of the unencrypted/plain resulting file you wish to generate
  • pubKey: the full path and name to a file containing the recipient's PGP public key
  • privKey: the full path and name to a file containing the recipient's PGP private key


If this function succeeds, it returns true, otherwise it returns false.

Example:

{
 PGPDecryptFile('C:\\Received\\budget.xlsx.pgp', 'C:\\Data\\budget.xlsx',
   'C:\\PGPKeys\\Bob.pubkey', 'C:\\PGPKeys\Bob.privkey');
}