# Chiffrer et déchiffrer un fichier à l'aide des composants PGP

Le Job de ce scénario chiffre et déchiffre un fichier CSV (customers.csv) à l'aide des composants tPGPEncrypt et tPGPDecrypt. Ce scénario utilise les composants et sous-Jobs suivants :

* Un tPGPEncrypt\_1, chiffrant le fichier CSV spécifié et stockant le fichier chiffré dans un dossier spécifié.
* Le sous-Job *Encrypted file*, affichant le contenu du fichier chiffré.
* Un tPGPDecrypt\_1, déchiffrant le fichier chiffré et stockant le fichier déchiffré dans un dossier spécifié.
* Le sous-Job *Decrypted file*, affichant le contenu du fichier déchiffré.

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

Voici le contenu du fichier customers.csv. Le fichier est stocké dans "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.
```

### Dans cette section

* [Créer le Job](https://help.qlik.com/talend/fr-FR/components/8.0/gpg/creating-job-pgp)
* [Configurer le composant tPGPEncrypt_1](https://help.qlik.com/talend/fr-FR/components/8.0/gpg/encrypting-decrypting-file-using-pgp-tpgpencrypt1)
* [Configurer le sous-Job de chiffrement de fichier](https://help.qlik.com/talend/fr-FR/components/8.0/gpg/encrypting-decrypting-file-using-pgp-encrypted-file)
* [Configurer le composant tPGPDecrypt_1](https://help.qlik.com/talend/fr-FR/components/8.0/gpg/encrypting-decrypting-file-using-pgp-tpgpdecrypt1)
* [Configurer le sous-Job de déchiffrement de fichier](https://help.qlik.com/talend/fr-FR/components/8.0/gpg/encrypting-decrypting-file-using-pgp-decrypted-file)
* [Exécuter le Job](https://help.qlik.com/talend/fr-FR/components/8.0/gpg/encrypting-decrypting-file-using-pgp-executing-job)

**Information associée**

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