PGPDecryptFile function

function PGPDecryptFile(
  inFile:  string,
  outFile: string,
  pubKey:  string,
  privKey: string
): boolean

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 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 recipient’s PGP private key

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

Example:

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