Skip to main content Skip to complementary content

Encrypting and decrypting back sensitive data

This scenarios uses two Jobs. The first Job encrypts last names, postal codes and dates of births. The second Job decrypts back the encrypted sensitive data.

Setting up the encryption Job

Procedure

  1. Drop the following components from the Palette onto the design workspace: tFixedFlowInput, tDataEncrypt and tFileOutputDelimited.
  2. Connect tFixedFlowInput to tDataEncrypt using a Row > Main link.
  3. Connect tDataEncrypt to tFileOutputDelimited using a Row > Main link.

Results

A Job using the tFixedFlowInput, tDataEncrypt, and tFileOutputDelimited components.

Using tFixedFlowInput to load sample data

Procedure

  1. Double-click the tFixedFlowInput component to open its basic settings.
  2. Click the [...] button next to Edit schema and use the [+] button in the dialog box to add columns.
    Schema of the tFixedFlowInput component.

    In this example, four columns are added.

  3. In the Mode area of the Component view, select Use Inline Content (delimited file) to display the Content field.
  4. In the Content table, enter the data you want to encrypt.
    HENRY;ACHIM;61571;12-12-1945
    GRAHAM;ADAH;13231;02-11-1988
    JENKINS;PAUL;16899;01-08-1999
    LIMA;ADALBERT;60882;20-10-2000
    ALVAREZ;OCTAVIA;2150;18-09-1962
    WEBB;ERIK;33697;09-09-1977
    
    Configuration of the tFixedFlowInput component.

Configuring the encryption operation

Procedure

  1. Double-click the tDataEncrypt component to open its basic settings.
  2. Click Sync columns to retrieve the schema from the previous component.
  3. In the Secret method list, select Cryptographic file.
  4. In the Password field, enter the password to be used for encrypting the cryptographic file.
  5. In the Cryptographic file path, enter the path to the cryptographic file to be generated in double quotes.
  6. Click Generate cryptographic file icon to generate the cryptographic file and select the cryptographic method used to encrypt the input data.
  7. In the Encryption table, select the check boxes corresponding to the columns you want to encrypt.
  8. Click the [...] button next to Edit schema.
  9. Change the type of the columns you want to encrypt to String, and click OK.
    Examples of input and output schemas.
  10. Propagate changes when prompted.
    Configuration of the tDataEncrypt component.

Protecting sensitive data with encryption

Procedure

  1. Double-click the tFileOutputDelimited component to open its basic settings.
  2. In the File Name field, set the path to the file that will contain the encrypted data.
    Configuration of the tFileOutputDelimited.
  3. Press F6 to save and execute the Job.

Results

In the generated file, data in the selected columns is encrypted using the AES standard.
Results of the encrypted data.

Setting up the decryption Job

Procedure

  1. Drop the following components from the Palette onto the design workspace: tFileInputDelimited, tDataDecrypt and tFileOutputDelimited.
  2. Connect tFileInputDelimited to tDataDecrypt using a Row > Main link.
  3. Connect tDataDecrypt to tFileOutputDelimited using a Row > Main link.

Results

A Job using the tFileInputDelimited, tDataDecrypt, and tFileOutputDelimited components.

Using tFileInputDelimited to load data

Procedure

  1. Double-click the tFileInputDelimited component to open its basic settings.
  2. In the File name/Stream field, set the path to the file that contains the data to be decrypted.
    Configuration of the tFileInputDelimited component.
  3. Click the [...] button next to Edit schema and use the [+] button in the dialog box to add columns.
    Schema of the tFileInputDelimited component.

    In this example, four columns with the string type are added.

Configuring the decryption operation

Procedure

  1. Double-click the tDataDecrypt component to open its basic settings.
  2. Click Sync columns to retrieve the schema from the previous component.
  3. Propagate changes when prompted.
  4. In the Secret method list, select Cryptographic file.
  5. In the Password field, enter the password used to encrypt the cryptographic file during the data encryption operation.
  6. In the Cryptographic file path, enter the path to the cryptographic file used to encrypt the input data in double quotes.
  7. In the Decryption table, select the check boxes corresponding to the columns you want to decrypt.
    Configuration of the tDataDecrypt component.

Decrypting back the encrypted sensitive data

Procedure

  1. Double-click the tFileOutputDelimited component to open its basic settings.
  2. In the File Name field, set the path to the file that will contain the decrypted data.
    Configuration of the tFileOutputDelimited component.
  3. Press F6 to save and execute the Job.

Results

In the generated file, data in the selected columns is decrypted.
HENRY;ACHIM;61571;12-12-1945
GRAHAM;ADAH;13231;02-11-1988
JENKINS;PAUL;16899;01-08-1999
LIMA;ADALBERT;60882;20-10-2000
ALVAREZ;OCTAVIA;2150;18-09-1962
WEBB;ERIK;33697;09-09-1977

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!