Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this Page

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

Snap type:

Transform

Description:

Pretty Good Privacy (PGP) is an encryption program that provides cryptographic privacy and authentication for data communication. PGP is popularly used to digitally sign, encrypt or decrypt email messages or files being transferred over the Internet.

Note
titleSnap History
The default security in the JRE limits the key length for encryption keys. For stronger encryption keys, you would need to manually install the Java Cryptographic Extension JARs on your JCC nodes.

 This Snap encrypts the data provided as an input stream using a public key. This Snap should be attached to the input binary data stream to be encrypted in the pipeline. 

  • Expected upstream Snaps: Any Snap, such as Document to Binary or File Reader, that produces PGP decrypted data in the output view.
  • Expected downstream Snaps: Any Snap, such as File Writer or Binary to Document, that accepts encrypted data in the input view.
  • Expected input: Stream of PGP decrypted data.
  • Expected output: Stream of PGP encrypted data.
Prerequisites:

[None]

Support and limitations:

Works in Ultra Task Pipelines.

Account: 

This Snap uses account references created on the Accounts page of SnapLogic Manager called the PGP Public Key Account that stores the public key used for encryption. See Configuring Binary Accounts for information on setting up this type of account. 

When setting up the account, enter your public PGP key. The credentials setup will automatically encrypt the message.

For signed encryption, this Snap uses account references created on the Accounts page of SnapLogic Manager called the PGP Private Key Account that stores the public and private key used for signed encryption. See Configuring Binary Accounts for information on setting up this type of account. 

When setting up the PGP Private Key account, enter your public and private PGP keys. The credentials setup will automatically encrypt and sign the message.

Views:


InputThis Snap has exactly one binary input view. The data that has to be encrypted is passed through this view.
OutputThis Snap has exactly one binary output view. The data encrypted is passed through this view as output.
ErrorThis Snap has at most one document error view and produces zero or more documents in the view.


Settings

Label

 

Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline. 
Symmetric Key Algorithm

Select or enter the symmetric key algorithm that you want to use to encrypt the input file. 

Note

This field is case-sensitive, and must be filled exactly as shown in the suggestible drop-down list options.

The algorithms available for this field are as follows:

  • IDEA: International Data Encryption Algorithm
  • TRIPLE_DES: Triple Data Encryption Standard (TDES or Triple DES)
  • CAST5 CAST5: (128 bit key, as per RFC 2144)
  • BLOWFISH Blowfish: (128 bit key, 16 rounds)
  • DES Data Encryption: Standard
  • AES_128: AES with 128-bit key
  • AES_192: AES with 192-bit key
  • AES_256: AES with 256-bit key
  • TWOFISH: Twofish
  • CAMELLIA_128: Camellia with 128-bit key
  • CAMELLIA_192: Camellia with 192-bit key
  • CAMELLIA_256: Camellia with 192-bit key

Example: AES_256

Default value: CAST5

Encrypted Filename


Required. For most use cases, this property may be left empty. A temporary file is used during the encryption and deleted by the Snap when it is done. If this property is empty, the Snap automatically generates a temporary filename. 

  • In some use cases, this temporary filename, which is included in the encrypted data, is used by  a PGP client application. If you enter this property, please make sure the filename be unique among the multiple instances of the same Snap. Otherwise, the Snap may fail with errors in creating or deleting it.
  • If entered, this property should be a filename only, neither an absolute nor an indirect file path. The directory for the temporary file is determined by the the Snap. If the Snap finds a URL separator ("/") in the filename, it throws an error and won't continue.
  • If this property is not empty or evaluated to a non-empty string, the Snap produces an additional entry in the output binary header document with the key “encrypted-filename”. It is suggested that, if File Writer Snap is connected to this Snap’s output view, the “File name” expression property of the File Writer Snap may be “$[‘encrypted-filename’]” so that the name of the written file can be the same as the Encrypted filename.

Example: sample.tmp

Default value:  [none]

Sign in

Sign encrypted file. Enabling this check box requires a Private Key Account.

Default value:  Not selected

Multiexcerpt include macro
nameSnap Execution
pageAnaplan Read

Multiexcerpt include macro
nameSnap_Execution_Introduced
pageAnaplan Read

Examples


The following example includes: Sample input data which is successfully encrypted using the PGP Encrypt Snap and then decrypted using the PGP Decrypt Snap. 

Encrypting Data Using the PGP Encrypt Snap  

We will start with a JSON Generator Snap which has a sample message "Hello World", which is formatted and written as JSON binary data for the PGP Encrypt Snap to ingest.

We can see that the Message is Encrypted as the output of the PGP Encrypt Snap.

Decrypted Data Using the PGP Decrypt Snap

We will write the file out as File_encrypt.pgp to the SnapLogic DB.  Then we proceed to decrypt the encrypted file and write it to the SnapLogic DB as File_decrypt.txt.
We can see that the output from the Decrypt Snap matches our original raw unencrypted data:


We have successfully decrypted the message.

Download the sample pipeline.

Downloads

Info

Important Steps to Successfully Reuse Pipelines

  1. Download and import the Pipeline into SnapLogic.

  2. Configure Snap accounts as applicable.

  3. Provide Pipeline parameters as applicable.


Attachments

Attachments
uploadfalse
oldfalse
patterns*.slp, *.zip

Insert excerpt
Binary Snap Pack
Binary Snap Pack
nopaneltrue