Table of Contents

Search

  1. Preface
  2. Function reference
  3. Constants
  4. Operators
  5. Dates
  6. Functions
  7. System variables
  8. Datatype reference

Function Reference

Function Reference

AES_DECRYPT

AES_DECRYPT

Returns the decrypted value in string format.
Data Integration
uses the Advanced Encryption Standard (AES) algorithm with the Electronic Codebook (ECB) mode of operation. The AES algorithm is a FIPS-approved cryptographic algorithm that uses 128-bit encryption.

Syntax

AES_DECRYPT (
value, key
)
Argument
Required/
Optional
Description
value
Required
Binary datatype. Value you want to decrypt.
key
Required
String datatype. Precision of 16 characters or fewer. Use the same key to decrypt a value that you used to encrypt it.

Return Value

Decrypted string value.
NULL if the input value is a null value.

Example

The following example returns decrypted Social Security numbers. In this example,
Data Integration
derives the key from the first three numbers of the Social Security number using the SUBSRT function:
AES_DECRYPT( SSN_ENCRYPT, SUBSTR( SSN,1,3 ))
SSN_ENCRYPT
DECRYPTED VALUE
07FB945926849D2B1641E708C85E4390
832-17-1672
9153ACAB89D65A4B81AD2ABF151B099D
832-92-4731
AF6B5E4E39F974B3F3FB0F22320CC60B
832-46-7552
992D6A5D91E7F59D03B940A4B1CBBCBE
832-53-6194
992D6A5D91E7F59D03B940A4B1CBBCBE
832-81-9528

0 COMMENTS

We’d like to hear from you!