This activity will PGP encode the contents of a specified file and write the encoded content to another file.
PGP (Pretty Good Privacy) is a widely-used standard for data encryption and decryption. It may be used to securely encrypt a variety of data stores, but in the context of this activity and the PGP_DECODE activity, it is used for encrypting and decrypting the contents of a file in the file system. Once encrypted, of course, you may do all sorts of things with the encrypted file, including sending it via email, FTP or another transport mechanism.
You should use your organisation's standard procedures for creating, storing and managing the security keys used with PGP. If you are new to PGP however, you can refer to the following heading for some information to get you started with PGP encryption and decryption:
Note: Some users running LANSA Composer on IBM i servers have reported that they found it necessary that the LANSA Integrator JSM be executing on a JVM at Java 7 or above for this activity to execute successfully.
INPUT Parameters:
PGPSOURCE: Required
This parameter must specify the full path and file name of the file whose contents are to be PGP encoded.
PGPTARGET: Optional
This parameter specifies the full path and file name for the file to which the encoded file contents are to be written. The default, if not specified, is the special value *AUTO.
If the special value *AUTO is used, the activity will use the path and file name specified in the PGPSOURCE parameter but replacing the file extension with an extension of '.pgp'. For example, if you specify /myfolder/myfile.dat in the PGPSOURCE parameter, then the activity will write the encoded contents to the file /myfolder/myfile.pgp.
PGPSIGNER: Required
This parameter must specify the signer. The signer value is comprised of two parts, the name and password in the format name:password. The name can be the keyID or the partial userID of the secret key.
PGPRECIPIENTS: Required
This parameter must specify a list of one or more recipients. The recipient name can be either a partial userID or the keyID of the recipient's public key.
PGPREPLACE: Optional
This parameter specifies what the activity should do if the output file already exists. The default value *NO will cause the activity to end in error if the output file already exists. Alternatively you can specify *YES to cause the existing file to be replaced.
PGPCIPHER: Optional
This parameter specifies the encryption cipher to be used. Possible values include *NONE, *DES, *3DES, *IDEA, *CAST5, *SAFER, *AES-128, *AES-192, *AES-256, *TWOFISH and *BLOWFISH. If not specified, the default used is *CAST5.
PGPLITERAL: Optional
This parameter specifies the literal data name. You may use special values *TOFILE, *FROMFILE and *CONSOLE. If not specified, the default used is *CONSOLE.
PGPSIGNER: Required
This parameter must specify the signer. The signer value is comprised of two parts, the name and password in the format name:password. The name can be the keyID or the partial userID of the secret key.
PGPRECIPIENTS: Required
This parameter must specify a list of one or more recipients. The recipient name can be either a partial userID or the keyID of the recipient's public key.
OUTPUT Parameters:
PGPENCODED:
Upon successful completion, this parameter will contain the actual path and file name of the output file containing the encoded contents of the file specified by the PGPSOURCE parameter.