# PGPコンポーネントを使ってファイルを暗号化および復号化

このシナリオのジョブは、tPGPEncryptコンポーネントとtPGPDecryptコンポーネントを使ってCSVファイル(customers.csv)を暗号化および復号化します。このシナリオには次のコンポーネントとサブジョブが含まれています。

* tPGPEncrypt\_1: 指定されたCSVファイルを暗号化し、指定されたフォルダーにそのファイルを保存します。
* *Encrypted file*サブジョブ: 暗号化されたファイルの内容を表示します。
* tPGPDecrypt\_1: 暗号化されたファイルを復号化し、指定されたフォルダーにそのファイルを保存します。
* *Decrypted file*サブジョブ: 復号化されたファイルの内容を表示します。

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

customers.csvの内容は次のとおりです。ファイルは"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.
```

### このセクション内

* [ジョブを作成](https://help.qlik.com/talend/ja-JP/components/8.0/gpg/creating-job-pgp)
* [tPGPEncrypt_1コンポーネントを設定](https://help.qlik.com/talend/ja-JP/components/8.0/gpg/encrypting-decrypting-file-using-pgp-tpgpencrypt1)
* [Encrypted fileサブジョブを設定](https://help.qlik.com/talend/ja-JP/components/8.0/gpg/encrypting-decrypting-file-using-pgp-encrypted-file)
* [tPGPDecrypt_1コンポーネントを設定](https://help.qlik.com/talend/ja-JP/components/8.0/gpg/encrypting-decrypting-file-using-pgp-tpgpdecrypt1)
* [Decrypted fileサブジョブを設定](https://help.qlik.com/talend/ja-JP/components/8.0/gpg/encrypting-decrypting-file-using-pgp-decrypted-file)
* [ジョブを実行](https://help.qlik.com/talend/ja-JP/components/8.0/gpg/encrypting-decrypting-file-using-pgp-executing-job)

**関連情報**

[tFileInputDelimited](https://help.qlik.com/talend/ja-JP/components/8.0/delimited/tfileinputdelimited)

[tLogRow](https://help.qlik.com/talend/ja-JP/components/8.0/logs-and-errors/tlogrow)