Links

PGP

Know the component and how to use it.
PGP (Pretty Good Privacy) is a cryptography component that provides authentication and cryptographic privacy for data communication.
Take a look at the configuration parameters of the component:
  • Account: sets the account to be used by the connector. The account should be either PUBLIC or PRIVATE-KEY.
  • Operation: defines the operation type (Encrypt Fields, Decrypt Fields, Encrypt Payload, Decrypt Payload, Encrypt File, or Decrypt File).
  • Fields: name of the fields to be encrypted inside the JSON entry. The fields must be separated by comma (eg.: param1, param2). This parameter is available only when Encrypt Fields or Decrypt Fields are selected in the Operation parameter.
  • Payload: can be defined as a single value or by Double Braces to get and set a payload. This parameter is available only when Encrypt Payload or Decrypt Payload are selected in the Operation parameter.
  • Charset: charset of the text.
  • File Name: name of the file to be encrypted/decrypted. This parameter supports Double Braces expressions and is available only when Encrypt File or Decrypt File are selected in the Operation parameter.
  • Output File Name: name of the encrypted file to be generated. This parameter supports Double Braces expressions and is available only when Encrypt File or Decrypt File are selected in the Operation parameter.
  • Hexadecimal: if the option is active, the value to be verified/signed must be informed in hex format; otherwise, it will be signed or verified as base64.
  • Armor: if the option is active, it will encrypt the messages in ASCII so they are sent in standard format, such as email.
  • Zip: if the option is active, it will zip the message before it gets encrypted.
  • Integrity Check: if the option is active, it will check the message integrity.
  • Fail On Error: if the option is active, the execution of the pipeline with error will be interrupted; otherwise, the pipeline execution proceeds, but the result will show a false value for the “success” property.

Messages flow

Operation Encryp Fields

Input

{
"parameter": "TEXT TO BE ENCRYPTED"
}

Output

{
"parameter": "AA01FF" // text encrypted
}

Operation Decrypt Fields

Input

{
"parameter": "AA01FF" // text encrypted
}

Output

{
"parameter": "TEXT DECRYPTED"
}

Operation Encrypt Payload

Input

{
"parameter": "TEXT TO BE ENCRYPTED"
}

Output

{
"result": "AA01FF" // text encrypted
}

Operation Decrypt Payload

Input

{
"parameter": "AA01FF" // text encrypted
}
Output
{
"result": "TEXT DECRYPTED"
}

Operation Encrypt File

Input

{
"fileName": "file.txt"
}

Output

{
"outputFileName": "file.txt.pgp" // file encrypted
}

Operation Decrypt File

Input

{
"fileName": "file.txt.pgp" // file encrypted
}

Output

{
"outputFileName": "file.txt.dec" // file decrypted
}

Output with error

{
"error": "java.io.FileNotFoundException: data1.csv (No such file or directory)",
"success": false
}
  • success: “false” when the operation fails.
  • error: information about the occurred error.