Returns plaintext as a string. Data Integration uses the Advanced Encryption Standard (AES) algorithm with the Galois/Counter Mode (GCM) of operation. The AES algorithm is a FIPS-approved cryptographic algorithm that uses 128, 192, or 256-bit keys.
Note: The Validate button doesn't validate this function. Review the syntax and argument rules to ensure that the arguments are valid.
Binary data type. The ciphertext value to be decrypted into plaintext.
init_vector
Required
String data type. Use the same initialization vector (IV) to decrypt a value that you used to encrypt the ciphertext. The IV must be 96-bit and randomly generated.
key
Required
String data type of size 128, 192, or 256 bits. Use the same key to decrypt a value that you used to encrypt it.
keysize
The size of the key argument, in bits, determines whether the keysize argument is optional or required.
- If the key argument size is <= 128 bits, then the keysize is optional.
- If the key argument size is > 128 bits and <= 192 bits, then the keysize is 192 bits, and required.
- If the key argument size is >192 and <=256 bits, then the keysize is 256 bits, and required.
Integer data type. Size of the key provided.
Possible values:128, 192, 256 bits. Default value is 128 bits.
Return Value
Decrypted string plaintext.
NULL if the input value is a null value.
Example
The following examples return decrypted Social Security numbers. The init_vector and key are the same values that were used to encrypt the Social Security number.
In this example, the init_vector is 12 characters, or 96 bits; the key is 16 characters, or 128 bits; the keysize is optional because the key is the default value of 128 bits:
In this example, the init_vector is 12 characters, or 96 bits; the key is 17 characters, or 136 bits; the keysize is required because the key is > 128 bits. Because the size of the key is less than 192 bits, the key is padded with null characters: