Function Reference > Functions > SHA256
  

SHA256

Returns the SHA-256 digest of the input value. The function uses Secure Hash Algorithm 2 (SHA-2) and returns a 256 bit digest. SHA256 is a one-way cryptographic hash function with a 256-bit hash value. You can conclude that input values are different when the SHA-256 digests of the input values are different.
Use SHA256 to verify data integrity or to generate unique keys.
SHA256 returns different values when the connection reads ASCII and Unicode data.

Syntax

SHA256( value )
The following table describes the argument for this command:
Argument
Required/Optional
Description
value
Required
String or binary datatype. The case-sensitive value for which you want to calculate digest.

Return value

Unique 32-byte binary.
NULL if the input is a null value.

Example

You want to write changed data to a database. Use SHA256 to generate hash digest values for rows of data that Data Integration reads from a source. When you run the task, compare the previously generated checksum values to the new checksum values. You can conclude that an updated checksum value indicates that the data has changed. You write rows with updated checksum values to the target.