If you require to encrypt an OpenPGP file , please follow the below instructions:
Illustrated below is an example of a flow where data in a CSV file is being read, the CSV file is being created and then encrypted into an OpenPGP csv file using the Byte Group step to convert the file into bytes which is being sent to a local machine.
The below image is the code that is in the Calculator step where the file name will be the current date (formmattedDate field) and the path name with the current date will be the file name which is being set as a parameter.
The file is then being converted into bytes using the Byte Group step as shown in the below image.
The OpenPGP mapper step is used to encrypt the file into a binary file as per the below image. You can create a connection or select an existing connection. To create a connection, click on the highlighted icon.
If you create a new connection, the below page will appear where you type a connection name and click on the highlighted icon to add a Public Key.
To reference the parameter of the path name in the Relay Based File System destination step, select the relay name and click on the highlighted link as shown in the below image.
The below page will appear. Type in the parameter name and click on the Use Path button.
Highlighted in the below image is the parameter name in the Relay Base File System destination step. Click on the save button to save this configuration.