# 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                                                       |

![](/files/E2bDMJHijbhm1Y6FrHHG)

**Example**

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

Where,

*str =* Hello World!

![](/files/LTiVxsBj6kwop5I9S5Tn)

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.

![](/files/XOoJ6FviVJbrFAJc3a8O)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.astera.com/functions/encoding/computesha256.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
