# sealSecret

**Kind:** Function

**Source:** [`atloria-monorepo/apps/api/src/documentation/payload-crypto.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/api/src/documentation/payload-crypto.ts#L45)

Seal a secret string. Returns `enc:v1:...` when a key is set; otherwise returns
the plaintext unchanged (key not wired yet — the runner still handles it). Empty
/ nullish values pass through untouched.

## Signature

```ts
function sealSecret(plaintext: T): T | string
```

## Parameters

| Name | Type |
|---|---|
| `plaintext` | `T` |

**Returns:** `T | string`
