# ComputeSHA256

| **Name**    | ***ComputeSHA256***                                                                                             |
| ----------- | --------------------------------------------------------------------------------------------------------------- |
| Syntax      | ComputeSHA256 (String str)                                                                                      |
| Purpose     | To compute the SHA-256 hash of a text value.                                                                    |
| Description | Returns a SHA-256 (Secure Hash Algorithm 256-bit (32-byte) hexadecimal value) representation of a given string. |
| Return Type | String                                                                                                          |
| Parameter   | str \[System.String] – The raw string to use as the input                                                       |

![](https://content.gitbook.com/content/ZSZJ1eFyVv71eDI5hU45/blobs/Azz5PgkdOxaNQBFeiZVC/0.png)

**Example**

In this example, we are passing the required parameters to the function transformation object using a *Variables* object.

Where,

*str =* Hello World!

![](https://content.gitbook.com/content/ZSZJ1eFyVv71eDI5hU45/blobs/sZUvY8mGAyhG1Fgpp2Dw/1.png)

Right-click on the function transformation object and select *Preview Output.* You can see that Astera has returned a fixed-size, 256-bit (32-byte) hexadecimal hashed value of the specified string.

![](https://content.gitbook.com/content/ZSZJ1eFyVv71eDI5hU45/blobs/FoeMhGallwvDra7go7w5/2.png)
