<!-- Sema documentation — std.crypto
     Sema is a new AI-native, neurosymbolic programming language most models
     have not been trained on. Full corpus: https://sema.cortex.a2olabs.com/llms-full.txt
     Install language support: https://sema.cortex.a2olabs.com/install-skill/ -->

# std.crypto

> Reflected API reference for the Sema standard-library module std.crypto.

> Generated by `sema doc` from `crates/sema-runtime/assets/stdlib/sema/crypto.sema`. Import with `from std.crypto import …`. For a narrative introduction see [std.crypto](/stdlib/crypto/).

# `crypto`

Bounded native SHA-256 helpers.

# `def sha256_text`

```sema
def sha256_text(text: str) -> str !{}
```

**Parameters**

| name | type |
|---|---|
| `text` | `str` |

**Returns** `str`

**Effects** `!{}`

# `def sha256_bytes`

```sema
def sha256_bytes(data: list[int]) -> str !{}
```

**Parameters**

| name | type |
|---|---|
| `data` | `list[int]` |

**Returns** `str`

**Effects** `!{}`

# `def sha256_json`

```sema
def sha256_json(value: Any) -> str !{}
```

**Parameters**

| name | type |
|---|---|
| `value` | `Any` |

**Returns** `str`

**Effects** `!{}`

# `def file_sha256`

```sema
def file_sha256(pathname: str) -> str !{fs.read}
```

**Parameters**

| name | type |
|---|---|
| `pathname` | `str` |

**Returns** `str`

**Effects** `!{fs.read}`
