# SM3

SM3 is a cryptographic hash function used in the Chinese National Standard. SM3 is mainly used in digital signatures, message authentication codes, and pseudorandom number generators. The message digest algorithm consists, by default, of 64 rounds and length of 256. SM3 lives in the **Hashing** category of the `fx` menu.

## Parameters

| Parameter | Type   | Required | Default | Description                                            |
| --------- | ------ | -------- | ------- | ------------------------------------------------------ |
| Input     | string | yes      | —       | Value to transform. Previous step output or a literal. |
| Length    | number | no       | `256`   | Numeric value. Default `256`.                          |
| Rounds    | number | no       | `64`    | Numeric value. Default `64`.                           |

`Input` is the primary value (previous step output or a literal).

## Returned value

| Type     | Description                       |
| -------- | --------------------------------- |
| `string` | Result of the SM3 transformation. |

## Limitations

- This operation treats Input as raw bytes (binary-capable). Non-text payloads may display differently after decoding.

## Example

<details>
<summary>Run SM3</summary>

SM3 is a cryptographic hash function used in the Chinese National Standard. Adjust optional parameters when the defaults do not match your payload.

1. Set **Input** to the value to transform (previous step output or a literal).

2. Review **Length**, **Rounds** and keep defaults unless your format requires otherwise.

3. Confirm **Output value** shows the transformed result.

</details>
