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


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

  • inFile: this is the full path and name to the file that you wish to encrypt
  • outFile: this is the full path and name of the resulting encrypted 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 sender's PGP private key


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

Example:

{
 PGPEncryptFile('C:\\Data\\budget.xlsx', 'C:\\Encrypted\\budget.xlsx.pgp',
   'C:\\PGPKeys\\Bob.pubkey', 'C:\\PGPKeys\Alice.privkey');
}