# Encrypting and decrypting a file using PGP components

The Job in this scenario encrypts and decrypts a CSV file (customers.csv) using tPGPEncrypt component and the tPGPDecrypt components. The scenario contains the following components and subJobs:

* tPGPEncrypt\_1, which encrypts the specified CSV file and stores the encrypted file in a specified folder.
* The *Encrypted file* subJob, which displays the content of the encrypted file.
* tPGPDecrypt\_1, which decrypts the encrypted file and stores the decrypted file in a specified folder.
* The *Decrypted file* subJob, which displays the content of the decrypted file.

![](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/use-case-pgp-1.png)

The following lists the content of customers.csv. The file is stored in "D:\cert\.

```
id;CustomerName;CustomerAddress
1;Griffith Paving and Sealcoatin;talend@apres91
2;Bill's Dive Shop;511 Maple Ave.  Apt. 1B
3;Childress Child Day Care;662 Lyons Circle
4;Facelift Kitchen and Bath;220 Vine Ave.
5;Terrinni & Son Auto and Truck;770 Exmoor Rd.
6;Kermit the Pet Shop;1860 Parkside Ln.
7;Tub's Furniture Store;807 Old Trail Rd.
8;Toggle & Myerson Ltd;618 Sheriden rd.
```

### In this section

* [Creating the Job](https://help.qlik.com/talend/en-US/components/8.0/gpg/creating-job-pgp)
* [Setting up the tPGPEncrypt_1 component](https://help.qlik.com/talend/en-US/components/8.0/gpg/encrypting-decrypting-file-using-pgp-tpgpencrypt1)
* [Setting up the Encrypted file subJob](https://help.qlik.com/talend/en-US/components/8.0/gpg/encrypting-decrypting-file-using-pgp-encrypted-file)
* [Setting up the tPGPDecrypt_1 component](https://help.qlik.com/talend/en-US/components/8.0/gpg/encrypting-decrypting-file-using-pgp-tpgpdecrypt1)
* [Setting up the Decrypted file subJob](https://help.qlik.com/talend/en-US/components/8.0/gpg/encrypting-decrypting-file-using-pgp-decrypted-file)
* [Executing the Job](https://help.qlik.com/talend/en-US/components/8.0/gpg/encrypting-decrypting-file-using-pgp-executing-job)

**Related information**

* [tFileInputDelimited](https://help.qlik.com/talend/en-US/components/8.0/delimited/tfileinputdelimited)
* [tLogRow](https://help.qlik.com/talend/en-US/components/8.0/logs-and-errors/tlogrow)