Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/content/docs/explanations/secrets/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,11 @@ into the string `"***"`.

In general, Tenzir does not assume that a secret is valid UTF-8, although most
operators will make that constraint. Conversely some secret stores may require
your secrets to be UTF-8, while some operators expect a binary secret.
your secrets to be UTF-8, while some operators expect a binary or otherwise
encoded secret.

To bridge this gap, you can base64-decode secrets using the
[`decode_base64`](/reference/functions/decode_base64) function and
base64-encode them using the [`encode_base64`](/reference/functions/encode_base64)
function:
To bridge this gap, you can use Tenzir's [encoding](/reference/functions#encoding)
and [decoding](/reference/functions#decoding) functions:

```tql
let $binary_secret = secret("my-encoded-secret").decode_base64()
Expand Down